Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Product < ActiveRecord::Base
- # attr_accessible :user_id, :title, :description, :category_id, :resolution, :opens_with, :photo, :price, :action_version, :status, :featured, :approval, :rating_average
- has_attached_file :photo, :styles => { :thumb => "100x100>" }
- validates_attachment_presence :photo
- validates_attachment_size :photo, :less_than => 5.megabytes
- validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/x-png']
- end
Add Comment
Please, Sign In to add comment