File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
activestorage/lib/active_storage/attached Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,10 @@ module Attached::Model
71
71
# and +avatar_blob+. But you shouldn't need to work with these associations directly in
72
72
# most circumstances.
73
73
#
74
- # The system has been designed to having you go through the ActiveStorage::Attached::One
75
- # proxy that provides the dynamic proxy to the associations and factory methods, like +attach+.
74
+ # Instead, +has_one_attached+ generates an ActiveStorage::Attached::One proxy to
75
+ # provide access to the associations and factory methods, like +attach+:
76
+ #
77
+ # user.avatar.attach(uploaded_file)
76
78
#
77
79
# The +:dependent+ option defaults to +:purge_later+. This means the attachment will be
78
80
# purged (i.e. destroyed) in the background whenever the record is destroyed.
@@ -171,8 +173,10 @@ def #{name}=(attachable)
171
173
# and +photos_blobs+. But you shouldn't need to work with these associations directly in
172
174
# most circumstances.
173
175
#
174
- # The system has been designed to having you go through the ActiveStorage::Attached::Many
175
- # proxy that provides the dynamic proxy to the associations and factory methods, like +#attach+.
176
+ # Instead, +has_one_attached+ generates an ActiveStorage::Attached::Many proxy to
177
+ # provide access to the associations and factory methods, like +attach+:
178
+ #
179
+ # user.photos.attach(uploaded_file)
176
180
#
177
181
# The +:dependent+ option defaults to +:purge_later+. This means the attachments will be
178
182
# purged (i.e. destroyed) in the background whenever the record is destroyed.
You can’t perform that action at this time.
0 commit comments