Hello friends,
I have a query like I am using a attchment_fu to store images.
But the i don''t want to store to the default path let say :path_prefix
=>
''public/uploads'' i want a dyname path for e.g :path_prefix
=> ''public/#{
current_user.id}'', So just wanted to know how can i say images to the
dynamic location.
Regards
Abhishek Shukla
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
> ''public/uploads'' i want a dyname path for e.g :path_prefix => ''public/#{ > current_user.id}'',Have you tried this like :path_prefix => "public/#{> current_user.id}" Instead of single quotes use double quotes Sijo -- Posted via http://www.ruby-forum.com/.
:path_prefix => "public/#{current_user.id}"
--
Posted via http://www.ruby-forum.com/.
Ok great things are working fine. but again i have a major concern when I am
declaring it like
:path_prefix => "public/user_#{current_user.id}"
in background it save the image in the following folder structure
"public/user_/123/_image.jpg"
And i am looking something like
"public/user_123/_image.jpg"
Actually it''s creating a just "user_" folder which i don;t
want, i want to
have "user_123".
Thanks
Abhis
On Thu, Jul 30, 2009 at 1:12 PM, Sijo Kg
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>wrote:
>
> :path_prefix => "public/#{current_user.id}"
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---