test/test_helper.rb in paperclip-sftp-1.0.3 vs test/test_helper.rb in paperclip-sftp-1.0.4
- old
+ new
@@ -29,10 +29,12 @@
Paperclip.options[:log] = false
Paperclip.interpolates(:work_dir) do |attachment, style|
File.expand_path(File.join(File.dirname(__FILE__), 'tmp'))
end
+ActiveRecord::Base.raise_in_transactional_callbacks = true
+
class Dummy < ActiveRecord::Base
include Paperclip::Glue
has_attached_file :avatar,
path: ":work_dir/:class/:attachment/:id_partition/:style/:filename",
@@ -40,6 +42,8 @@
sftp_options: {
host: "localhost",
user: "spectator",
password: "password"
}
+
+ do_not_validate_attachment_file_type :avatar
end