[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

redirect to pdf

Bober

12/5/2007 11:47:00 AM

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

when I try it open http://127.0.0.1:3001/p...
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?
2 Answers

Austin Ziegler

12/5/2007 12:59:00 PM

0

On 12/5/07, Bober <sebastian.bobrowski@gmail.com> wrote:
> in folder public/pdf I have a file "test.pdf"
>
> when I try it open http://127.0.0.1:3001/p...
> 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 * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Chad Perrin

12/5/2007 8:57:00 PM

0

On Wed, Dec 05, 2007 at 08:50:14PM +0900, Bober wrote:
> Hello!
> in folder public/pdf I have a file "test.pdf"
>
> when I try it open http://127.0.0.1:3001/p...
> 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.

--
CCD CopyWrite Chad Perrin [ http://ccd.ap... ]
Phillip J. Haack: "Productivity is not about speed. It's about velocity.
You can be fast, but if you're going in the wrong direction, you're not
helping anyone."