Sha256: 3947111bc71abf71ae0c615f957f05b9ae2020e56498895c5964c87eb9d70d8b

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

# hook onto model index creation to create related FT indexes
module Mongoid
  module Indexable
    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/indexable.rb
mongoid_fulltext-0.7.1 lib/mongoid/full_text_search/indexable.rb
mongoid_fulltext-0.7.0 lib/mongoid/indexable.rb