Skip to content
Tags

, ,

Overriding Paperclip options

March 16, 2011

Recently I had to override paperclip options.
Apparently there is an hash merging to which can override the options.
https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip.rb#L239

So I wrote to that hash from the decorator: I can have access to it, apparently at the class level.

attachment_definitions[:attachment].merge!({ :path => ":rails_root/public/assets/products/:id/:style.:extension",
                    :storage => :s3,
                    :s3_credentials => "#{Rails.root}/config/paperclip_s3.yml"})
Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: