Manmay wrote:
> hi Zhao,
>
> u can use send_file to relate the file in u'r file system but not in
> public dir of u'r rails proj like,
>
> send_file(RAILS_ROOT+"/images_uploaded/"+params[:filename] ,
> :disposition => 'inline')
>
I have tried but got undefined method `send_file' for
#<ActionView::Base:0x41222cc0> error, this is my code in *.html.erb:
...
<td> <%= send_file ('/tmp/log.txt', :disposition => 'inline')
--
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
-~----------~----~----~----~------~----~------~--~---