Sha256: 28b1e60c8183c629cb5af85eedde9e1a1b9591c94432f5861d48461103f5e4c5

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

class MongoidAlpha 
  include Mongoid::Document
  include Mongoid::Mebla
  field :name
  field :value, :type => Integer
  field :cost, :type => Float
  field :hidden
  
  self.whiny_indexing = true
  
  search_in :name, :cost, :value
end

class MongoidBeta
  include Mongoid::Document
  include Mongoid::Mebla
  field :name
  
  self.whiny_indexing = true
  
  embeds_many :mongoid_gammas
  
  search_in :name => {:boost => 2.0, :analyzer => 'snowball'}
end

class MongoidTheta < MongoidAlpha
  field :extra  
  
  search_in :extra
end

class MongoidGamma
  include Mongoid::Document
  include Mongoid::Mebla
  field :name
  field :value, :type => Integer  
  
  self.whiny_indexing = true
  
  embedded_in :mongoid_beta
  
  search_in :name, :value, :embedded_in => :mongoid_beta
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mebla-1.0.1 spec/fixtures/models.rb