you are in: codestackercodes [RSS] → tag: paperclip [RSS]

paperclip refresh all images Delicious Email

run this task

show/hide lines
   1  rake paperclip:refresh class=MyClass
created by leozera — 26 October 2009 — get a short url — tags: paperclip rails ruby embed

paperclip ie validation Delicious Email

show/hide lines
   1  validates_attachment_content_type :image,
   2    :content_type => [
   3      'image/jpeg',
   4      'image/pjpeg', # for progressive jpeg (IE mine-type for regular jpeg) 
   5      'image/png',
   6      'image/x-png', # IE mine-type for PNG
   7      'image/gif'
   8  ]
created by leozera — 16 August 2009 — get a short url — tags: ie paperclip rails ruby embed

paperclip running in passenger Delicious Email

it’s necessary set the correct path of imagemagick. in os x (dev) e linux (production):

show/hide lines
   1  if RAILS_ENV == "development" 
   2    Paperclip.options[:image_magick_path] = '/opt/local/bin/' 
   3  else 
   4    Paperclip.options[:image_magick_path] = '/usr/bin/' 
   5  end 
created by leozera — 22 December 2008 — get a short url — tags: paperclip passenger rails ruby embed