module Regressor::Model::Relation::HasMany

Public Instance Methods

has_many_relations() click to toggle source
# File lib/model/active_record/relation/has_many.rb, line 5
def has_many_relations
  @model.constantize.reflect_on_all_associations(:has_many).map(&:name).map do |relation|
    "it { is_expected.to have_many :#{relation} }"
  end.join("\n  ") rescue nil
end