construct_join_attributes
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (-38)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (13)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
construct_join_attributes(*records)
private
Construct attributes for :through pointing to owner and associate. This is used by the methods which create and delete records on the association.
We only support indirectly modifying through associations which have a belongs_to source. This is the “has_many :tags, through: :taggings” situation, where the join model typically has a belongs_to on both side. In other words, associations which could also be represented as has_and_belongs_to_many associations.
We do not support creating/deleting records on the association where the source has some other type, because this opens up a whole can of worms, and in basically any situation it is more natural for the user to just create or modify their join records directly as required.