Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/technoweenie/attachment_fu/backends/db_file_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ def save_to_storage
if save_attachment?
(db_file || build_db_file).data = temp_data
db_file.save!
self.class.update_all ['db_file_id = ?', self.db_file_id = db_file.id], ['id = ?', id]
self.db_file_id = db_file.id
self.class.where(:id => id).update_all(:db_file_id => db_file.id)
end
true
end
end
end
end
end
end