Search code examples
ruby-on-railsruby-on-rails-3paperclipafter-save

deprecated after_save solution in rails 3


hi I am create one application in rails 3 I am using paperclip in which i want to invoke one paperclip function for generate a thumbnail of image but when I invoke a after_save method it will give a error

DEPRECATION WARNING: Base#after_save has been deprecated, please use Base.after_save :method instead. (called from at app/models/asset.rb:23)


Solution

  • try this: In your model, rename the method after_save to create_thumbnail and add

    after_save :create_thumbnail