I am using the paperclip gem to upload images,I want to upload both landscape and portrait images.Can any please help me how to set the dimension for both the images.
My code is:
has_attached_file :media,
:styles => {:yplarge=>"440x300>"},
:path => ":rails_root/public/system/:class/:id/:style/:basename.:extension",
:url => "/system/buzz_pictures/:id/:style/:basename.:extension"
validates_attachment_size :media, :less_than => 2.megabytes,
:message => "Please attach a smaller picture."
validates_attachment_content_type :media,
:content_type=>['image/jpeg', 'image/png', 'image/gif']
This code is working for landscape images but not for portrait.