Forum: Ruby on Rails No action responded to data error using link_to .download a file from specific location

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
srikanth (Guest)
on 2009-01-29 11:53
(Received via mailing list)
Hi ,

I have appliaction which has various type of streams.
And  iam providing a link to stremname .
ex:suppose i have stream called test.mpeg4 in public/data/test.mpeg4
folder
using to link to stream.
<%= link_to stream.name, stream.location %>

in index page of controller if i click on name of stream it is
pointing to below link and able to download.
http://localhost:3000/data/cmd.txt

if i use the same link in show page it is pointing to below link
http://localhost:3000/streams/data/cmd.txt

and as a result not able to download stream anddisplaying like
Unknown action
No action responded to data. Actions: create, creates, destroy, edit,
index, new, show, test, and update

can any one suggest how to resolve the problem.

thanks
Srikanth
This topic is locked and can not be replied to.