Guest User

Untitled

a guest
Apr 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Index: lib/technoweenie/attachment_fu/backends/db_file_backend.rb
  2. ===================================================================
  3. --- lib/technoweenie/attachment_fu/backends/db_file_backend.rb (revision 6256)
  4. +++ lib/technoweenie/attachment_fu/backends/db_file_backend.rb (revision 6257)
  5. @@ -17,6 +17,11 @@
  6. def current_data
  7. db_file.data
  8. end
  9. +
  10. + # Fix for keeping a db file
  11. + def temp_paths
  12. + @temp_paths ||= (new_record? || !current_data) ? [] : [create_temp_file]
  13. + end
  14.  
  15. protected
  16. # Destroys the file. Called in the after_destroy callback
Add Comment
Please, Sign In to add comment