spec/fixtures/models.rb in mebla-1.0.3 vs spec/fixtures/models.rb in mebla-1.1.0

- old
+ new

@@ -6,20 +6,22 @@ field :cost, :type => Float field :hidden self.whiny_indexing = true + referenced_in :mongoid_epsilon + 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 @@ -35,10 +37,12 @@ class MongoidDelta include Mongoid::Document include Mongoid::Mebla field :name + + self.whiny_indexing = true end class MongoidOmega < MongoidDelta search_in :name end @@ -61,6 +65,35 @@ self.whiny_indexing = true embedded_in :mongoid_beta search_in :name, :value, :embedded_in => :mongoid_beta +end + +class MongoidPi + include Mongoid::Document + include Mongoid::Mebla + field :name + + self.whiny_indexing = true + + references_one :mongoid_epsilon + + search_in :name, :does_smth + + def does_smth + "returns smth" + end +end + +class MongoidEpsilon + include Mongoid::Document + include Mongoid::Mebla + field :name + + self.whiny_indexing = true + + referenced_in :mongoid_pi + references_many :mongoid_alphas + + search_in :name, :search_relations => {:mongoid_pi => :name, :mongoid_alphas => [:name, :value]} end \ No newline at end of file