Skip to content

Commit

Permalink
Fixing interaction with awesome nested set.
Browse files Browse the repository at this point in the history
It calls reload within the save which was clearing out the cache_id and skipping
upload of file.
  • Loading branch information
serialworm committed Jul 6, 2023
1 parent 269c37a commit a81450a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/carrierwave/orm/activerecord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def mount_base(column, uploader=nil, options={}, &block)
prepend mod
mod.class_eval <<-RUBY, __FILE__, __LINE__+1
# Reset cached mounter on record reload
def reload(*)
@_mounters = nil
def reload(*args)
if args.size == 0
@_mounters = nil
end
super
end
Expand Down

0 comments on commit a81450a

Please sign in to comment.