Sha256: e5bb6b6ec1d1a7142cfdeb3c7e20bf3e669df7886f79296ef49791c78c3a4335

Contents?: true

Size: 290 Bytes

Versions: 3

Compression:

Stored size: 290 Bytes

Contents

class Product
  include Mongoid::Document
  include Mongoid::Search
  field :brand
  field :name

  references_many :tags
  referenced_in   :category
  embeds_many     :subproducts

  search_in :brand, :name, :outlet, :tags => :name, :category => :name, :subproducts => [:brand, :name]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mongoid_search-0.2.3 spec/models/product.rb
mongoid_search-0.2.1 spec/models/product.rb
mongoid_search-0.2.0 spec/models/product.rb