diff --git a/app/models/asset.rb b/app/models/asset.rb index 157593fac..5a9085cda 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -342,7 +342,7 @@ class Asset < ApplicationRecord end def update_contents(new_file) - file.attach_file_version(io: new_file, filename: file_name) + attach_file_version(io: new_file, filename: file_name) self.version = version.nil? ? 1 : version + 1 save end