File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
activestorage/lib/active_storage/attached Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ def blobs
49
49
def attach ( *attachables )
50
50
if record . persisted? && !record . changed?
51
51
record . public_send ( "#{ name } =" , blobs + attachables . flatten )
52
- record . save
52
+ return record . public_send ( "#{ name } " ) if record . save
53
+ false
53
54
else
54
55
record . public_send ( "#{ name } =" , ( change &.attachables || blobs ) + attachables . flatten )
55
56
end
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ def blank?
56
56
def attach ( attachable )
57
57
if record . persisted? && !record . changed?
58
58
record . public_send ( "#{ name } =" , attachable )
59
- record . save
59
+ return record . public_send ( "#{ name } " ) if record . save
60
+ false
60
61
else
61
62
record . public_send ( "#{ name } =" , attachable )
62
63
end
You can’t perform that action at this time.
0 commit comments