jrgifford / delayed_paperclip

Process your Paperclip attachments in the background with delayed_job or Resque.
http://www.jstorimer.com/ruby/2010/01/30/delayed-paperclip.html
MIT License
404 stars 155 forks source link

Use Module#prepend instead of alias to override Paperclip::Attachment… #189

Closed whatcould closed 8 years ago

whatcould commented 8 years ago

Hi,

I'm working on getting paperclip_meta to play nice with Rails 5 and in the process noticed the change in #162 removing alias_method_chain. I believe the point of deprecating alias_method_chain is that Module#prepend is cleaner, so doing what #162 does (basically re-implementing a_m_c) seems to miss the point, unless you're trying to support Ruby 1.9 for some reason.

I replaced all the alias :this, :that calls and used Module#prepend in the Railtie. Not totally sure about the naming of the @post_processing_with_delay instance variable, but I left it in because it didn't seem right to just use@post_processing.

morgoth commented 8 years ago

@whatcould Thanks, Previously we supported 1.9 indeed.