Rails3 File open method

Hi,

I have upgraded from rails 2 to rails3… I wanted to know to know how
to open a file and write it in a location

for eg… i need to save a image in /public/images+@imagename…

Please help me.

If /public/ is an absolute path on your file-system, you can use the
standard Ruby File methods. If /public/ must be relative to your app,
use the standard File methods relative to Rails.root.