Hi,
Is there a way to make the path dynamic using fields from the table that
paperclip belongs (just like the id)?
Here’s what I have tried.
class Photo < ActiveRecord::Base
belongs_to :event
belongs_to :photographer
has_attached_file :photo,
:styles => { :thumb => “128x128>”, :original =>
“328x328>” },
:path =>
“:photographer_id/:event_id/:id/:style.:extension”
end
Where :event_id and :photographer_id are fields from in the Photo model?