Module: ActiveRecord::Collections::Collectable::Relation
- Defined in:
- lib/active_record/collections/collectable.rb
Instance Method Summary collapse
- #collection ⇒ Object (also: #to_collection)
- #kollektion ⇒ Object
- #values_hash ⇒ Object (also: #to_values_hash, #to_hash)
Instance Method Details
#collection ⇒ Object Also known as: to_collection
39 40 41 42 |
# File 'lib/active_record/collections/collectable.rb', line 39 def collection # do this with a hash so that we don't cause the relation query to execute kollektion.from_hash(values_hash) end |
#kollektion ⇒ Object
29 30 31 |
# File 'lib/active_record/collections/collectable.rb', line 29 def kollektion klass.kollektion end |
#values_hash ⇒ Object Also known as: to_values_hash, to_hash
33 34 35 |
# File 'lib/active_record/collections/collectable.rb', line 33 def values_hash ActiveRecord::Collections::Serializer.to_hash(values.merge({collectable: klass})) end |