Sha256: b66cd803acf2f66cdddd0d5a70c979a36867e0da9301b4eaa20f538091b25ff9

Contents?: true

Size: 987 Bytes

Versions: 1

Compression:

Stored size: 987 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 MongoidTau < MongoidAlpha
  field :extra2  
end

class MongoidDelta
  include Mongoid::Document
  include Mongoid::Mebla
  field :name
end

class MongoidOmega < MongoidDelta
  search_in :name
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.2 spec/fixtures/models.rb