using the paperclip gem i want to validate the production part when someone uploads a image.It works in development but not in production mode
class Listing < ActiveRecord::Base
if Rails.env.development?
has_attached_file :image, :styles => { :medium => "200x", :thumb => "100x100>" }, :default_url => "default.jpg"
validates_attachment_content_type :image, :content_type => %w(image/jpeg image/jpg image/png)
else
has_attached_file :image, :styles => { :medium => "200x", :thumb => "100x100>" }, :default_url => "default.jpg"
validates_attachment_content_type :image, :content_type => %w(image/jpeg image/jpg image/png)
:storage => :dropbox,
:dropbox_credentials => Rails.root.join("config/dropbox.yml")
:path => ":style/:id_:filename"
end
end
getting error
/etsydemo2014/app/models/listing.rb:12: syntax error, unexpected =>, expecting keyword_end :storage => :dropbox, ^ /Users/neilpatel/Desktop/Rails/etsydemo2014/app/models/listing.rb:13: syntax error, unexpected ',', expecting keyword_end