Open sowenjub opened 10 years ago
+1. Have you found a solution for this @sowenjub?
@licatajustin I just ordered my code as explained above.
+1. Thanks for posting your workaround, @sowenjub. It worked for me as well.
+1 on fixing this bug. I use an ActiveSupport::Concern to handle my Paperclip config, so re-ordering the methods is non-trivial. Example:
# app/models/concerns/attachable_file.rb
def has_attachable_file( attachment_name, options={} )
class_eval do
has_attached_file attachment_name, {
paperclip_config_stuff: => :etc,
}.deep_merge(options)
process_in_background attachment_name
end
end
# app/models/user.rb
has_attachable_file :profile
has_attachable_file :cover_art
Hi,
I don't know whether it can be fixed or just something that should be mentioned somewhere in the docs, but if you have 2 attachments on the same model, the following will cause "NoMethodError: undefined method
[]=' for nil:NilClass in delayed_paperclip-2.7.1/lib/delayed_paperclip.rb:51:in
process_in_background'":while this will work
Best,