Forum: Ruby on Rails acts_as_attachment save file in folder named after models pa

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5d25fe90c83544b4676fa3c7a27c2aba?d=identicon&s=25 teesea (Guest)
on 2007-04-08 13:38
(Received via mailing list)
This is probably pretty easy, but I'm still a newb as far as ruby and
rails goes.

I am using the acts_as_attachment and would like to know how I go
about setting the path that the file is saved to so that it is saved
in a folder named after the models parent model id

Thanks in advance

Tony
5d25fe90c83544b4676fa3c7a27c2aba?d=identicon&s=25 teesea (Guest)
on 2007-04-09 15:06
(Received via mailing list)
After having another dig around found the answer so I thought I'd post
it

All you need to alter is the full_filename method in
file_system_methods.rb file to the path you want
This topic is locked and can not be replied to.