aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test/models/reflection_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix that models can clobber each others' attachment reflectionsGeorge Claghorn2018-07-071-14/+19
| | | | | | | | | | | | | | Consider the following model definitions: class User < ApplicationRecord has_one_attached :avatar end class Group < ApplicationRecord has_one_attached :avatar end If you attempt to reflect on the User model's avatar attachment via User.reflect_on_attachment, you could receive a reflection for the Group model's avatar attachment. Fix this by ensuring that each model class uses its own Hash object to track attachment reflections.
* Move ActiveStorage reflection logic entirely into ActiveStorageKevin Deisz2018-05-311-2/+2
|
* Reflection for attachmentsKevin Deisz2018-05-301-0/+29
Add the ability to reflect on the attachments that have been defined using ActiveRecord::Reflection.