module Regressor::Model::Mongoid::Relation::HasMany

Public Instance Methods

has_many_relations() click to toggle source
# 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() click to toggle source
# File lib/model/mongoid/relation/has_many.rb, line 7
def has_many_relations_as_string
  has_many_relations.join("\n  ")
end