# Link\_to

**URL:** <https://www.ruby-forum.com/t/link-to/110887>\
**Category:** Rails\
**Created:** [July 31, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/link-to/110887 "2007-07-31T19:40:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 31, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/link-to/110887/1 "2007-07-31T19:40:52Z")

</div>

Im trying to use the link\_to helper to open a blank window which is  
basically just a framed window to display user info without all the  
extra distractions that come along with opening this window. Here is  
what I got:

\<%= link\_to ‘Airline Preferences’, {:action =\> ‘airline\_preferences’,  
:id =\> @user.id, :method =\> ‘post’ }, :target =\> ‘blank’, :onclick =\>  
‘MyWindow=window.open(‘airline\_preferences.rhtml’,‘MyWindow’,‘toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=900,height=500’);  
return false;’, :class =\> ‘page\_links’ %\>

But I get this error:

no route found to match  
“/enroll/airline\_hotel\_info/airline\_preferences.rhtml” with  
{:method=\>:get}

I do have the proper methods in my controller, so I have no idea what’s  
going on. Please help, thanks,

~S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 31, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/link-to/110887/2 "2007-07-31T19:47:23Z")

</div>

example from the api

link\_to “View Image”, { :action =\> “view” }, :popup =\>  
[‘new\_window\_name’, ‘height=300,width=600’]

adjust per your requirements.

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [August 1, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/link-to/110887/3 "2007-08-01T18:47:48Z")

</div>

It displays the right page, but contrary to the code and the :popup  
hash, it does not open in a seperate popup window. Thanks,

~S
