class RcAccountabilityPhoto < ActiveRecord::Base
  attr_accessible :title, :rc_accountability_resource_id, :institution_id
  attr_accessible :picture  

  belongs_to :rc_accountability_resource
  belongs_to :institution

  has_attached_file :picture, 
                    :styles => lambda {|a| { :small=>"x100", :large=>"x720"}}, 
                    :convert_options => { :small => "-quality 75", :large => "-quality 75" }, 
                    :processor => :MiniMagick
  
  validates_attachment_content_type :picture,
                    :content_type => [ 'image/jpeg', 'image/png', 'image/gif', 'image/jpg', 'image/x-png', 'image/pjpeg' ]
end
