teesea
2007-Apr-08 11:36 UTC
acts_as_attachment save file in folder named after models parent id
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
teesea
2007-Apr-09 13:06 UTC
Re: acts_as_attachment save file in folder named after models parent id
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 On Apr 8, 12:36 pm, "teesea" <t.co...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---