Sha256: c3c296b76886b44627ac972300bf5ad3fb583605c6b17d1a5ec75de92f075612

Contents?: true

Size: 348 Bytes

Versions: 3

Compression:

Stored size: 348 Bytes

Contents

# hook onto model index creation to create related FT indexes
module Mongoid
  module Indexes
    module ClassMethods
      alias_method :create_fulltext_indexes_hook, :create_indexes

      def create_indexes
        create_fulltext_indexes if respond_to?(:create_fulltext_indexes)
        create_fulltext_indexes_hook
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid_fulltext-0.8.0 lib/mongoid/full_text_search/indexes.rb
mongoid_fulltext-0.7.1 lib/mongoid/full_text_search/indexes.rb
mongoid_fulltext-0.7.0 lib/mongoid/indexes.rb