Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Listing < ActiveRecord::Base
- if Rails.env.development?
- has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png"
- validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
- else
- has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png"
- validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"],
- :storage => :dropbox,
- :dropbox_credentials => Rails.root.join("config/dropbox.yml"),
- :path => ":style/:id_:filename"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement