redirect to pdf

B

Bober

Hello!
in folder public/pdf I have a file "test.pdf"

when I try it open http://127.0.0.1:3001/pdf/test.pd
everything is ok, browser open test.pdf.

but when I try to redirect in method
(redirect_to_path "/pdf/test.pdf" )

I see error

no route found to match "/pdf/test.pdf" with {:method=>:get}

what is wrong?
 
A

Austin Ziegler

in folder public/pdf I have a file "test.pdf"

when I try it open http://127.0.0.1:3001/pdf/test.pd
everything is ok, browser open test.pdf.

but when I try to redirect in method
(redirect_to_path "/pdf/test.pdf" )

I see error

no route found to match "/pdf/test.pdf" with {:method=3D>:get}

what is wrong?

=85that you're asking a Rails on ruby-talk. I also suspect that a Google
search would answer your question quickly, although I'm not sure
because I don't actually use rails.

-austin
--=20
Austin Ziegler * (e-mail address removed) * http://www.halostatue.ca/
* (e-mail address removed) * http://www.halostatue.ca/feed/
* (e-mail address removed)
 
C

Chad Perrin

Hello!
in folder public/pdf I have a file "test.pdf"

when I try it open http://127.0.0.1:3001/pdf/test.pd
everything is ok, browser open test.pdf.

but when I try to redirect in method
(redirect_to_path "/pdf/test.pdf" )

Are you sure that leading / is supposed to be there? Maybe it should be
"pdf/test.pdf" instead of "/pdf/test.pdf".

I'm not really much of a Rails user (I've just toyed with it a little),
but that's the first thing that leaps to mind.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,273
Messages
2,571,364
Members
48,050
Latest member
Carson62C3

Latest Threads

Top