Topic: Paperclip and PATH question.

Hi guys,

I would like to know if its possible to set my path other models data?

Here is what i have in mind.

I have a company. I can attach several photos.
But i would like to have my has_attached_file path like this :

models : company_photos

has_attached_file :photo, :path => ':rails_root/public/photos/:company_name/:id'

how can i get the :company_name attribute? I have tryed with @company.company_name but doesn't worked.



Re: Paperclip and PATH question.

I am also looking to make something the same, did you manage?

Re: Paperclip and PATH question.

not yet, i always try to find the solution, for now, i plan to create a new method that return the value. But not tested yet.
I give you feedback after some tests.