Advertisement
Guest User

Untitled

a guest
Feb 10th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. class Listing < ActiveRecord::Base
  2. if Rails.env.development?
  3. has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png"
  4. validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
  5. else
  6. has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png"
  7. validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"],
  8. :storage => :dropbox,
  9. :dropbox_credentials => Rails.root.join("config/dropbox.yml"),
  10. :path => ":style/:id_:filename"
  11. end
  12.  
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement