On Tue, Feb 17, 2009 at 4:42 AM, Newb Newb <[email protected]
> wrote:

>
> Dear all.
> using this below code i get file name of blob
> image = params[:image][:blob]
>          puts image.methods
>          image_name = image.original_filename
> it gives me
> => rose.jpg
> actually i want to append some string with it.how can i do it.pls help.
> example => rose_big.jpg
>

Hi, here's another option using the File class:

filename = File.basename( filename, ".jpg" )  + "_what_ever_you_want
+ File.basename( filename )

Good luck,

-Conrad



>
> Thanks
> --
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to