Class: Pakyow::Data::UnknownAssociation
- Defined in:
- lib/pakyow/data/errors.rb
Instance Method Summary collapse
Instance Method Details
#contextual_message ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/pakyow/data/errors.rb', line 72 def if associations.any? String.new( <<~MESSAGE The following associations exist for #{@context.__object_name.name}: MESSAGE ).tap do || associations.each do |association| << " * #{association.name}" end end else String.new( <<~MESSAGE No associations exist for #{@context.__object_name.name}. MESSAGE ) end end |