From c4d361282d277753f8ea39848e12578fbed63289 Mon Sep 17 00:00:00 2001 From: "Marco V. Aguilar Soto" Date: Sun, 29 Jan 2012 12:57:09 -0500 Subject: [PATCH] most_appropriate_url removed from attachment(in paperclip 2.5.0) and now we are back to use simple 'url' that calls the most_appropriate_url thru url_generator --- Gemfile | 4 ++-- lib/delayed_paperclip/attachment.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 6d2ad7c..14b91cb 100644 --- a/Gemfile +++ b/Gemfile @@ -2,11 +2,11 @@ source "http://rubygems.org" gemspec -gem "paperclip", '2.4.5' +gem "paperclip", '2.5.0' gem "appraisal" gem "mocha" gem "sqlite3" gem "delayed_job", :require => false gem "resque", :require => false -gem "json", :platforms => :ruby_18 \ No newline at end of file +gem "json", :platforms => :ruby_18 diff --git a/lib/delayed_paperclip/attachment.rb b/lib/delayed_paperclip/attachment.rb index 24969e2..dbf9912 100644 --- a/lib/delayed_paperclip/attachment.rb +++ b/lib/delayed_paperclip/attachment.rb @@ -7,7 +7,7 @@ def self.included(base) base.alias_method_chain :post_processing, :delay base.alias_method_chain :post_processing=, :delay base.alias_method_chain :save, :prepare_enqueueing - base.alias_method_chain :most_appropriate_url, :processed + base.alias_method_chain :url, :processed base.alias_method_chain :post_process_styles, :processing end @@ -64,7 +64,7 @@ def save_with_prepare_enqueueing end end - def most_appropriate_url_with_processed + def url_with_processed if original_filename.nil? || delayed_default_url? default_url else