need to save generated pdf in public folder

im ruby on rails developer, im integrating princely plugin and prince
software to my rails application

i have generated pdf file successfully using the following code
princely =

      html_string = render_to_string(:template => 'test_methods/
visual_test/generate_report.rhtml', :layout=> false)

      :filename => 'visual_test',
      :type => 'application/pdf'

now i want to need save the pdf file in my public folder, i have tried
so many types

but till now im not getting any result

please help me

thanks in advance

Ratnam Raju

send_data sends data backs to browser making the request. If you want
to save data to a file on your server have a look at the File class.