Module: Regressor::Model::Mongoid::Relation::HasMany
- Included in:
- Regressor::Model::MongoidModel
- Defined in:
- lib/model/mongoid/relation/has_many.rb
Instance Method Summary collapse
Instance Method Details
#has_many_relations ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/model/mongoid/relation/has_many.rb', line 11 def has_many_relations @model.reflect_on_all_associations(:has_many).map(&:name).map do |relation| ::Regressor::Model::Expression.new(:is_expected, :to, :have_many, relation).to_s end end |
#has_many_relations_as_string ⇒ Object
7 8 9 |
# File 'lib/model/mongoid/relation/has_many.rb', line 7 def has_many_relations_as_string has_many_relations.join("\n ") end |