# Help with RESTful named url options

**URL:** <https://www.ruby-forum.com/t/help-with-restful-named-url-options/114932>\
**Category:** Rails\
**Created:** [September 18, 2007, 10:53pm UTC](https://www.ruby-forum.com/t/help-with-restful-named-url-options/114932 "2007-09-18T22:53:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [September 18, 2007, 10:53pm UTC](https://www.ruby-forum.com/t/help-with-restful-named-url-options/114932/1 "2007-09-18T22:53:58Z")

</div>

I’ve found quite a few posts on the subject, but no satisfactory  
answers. Maybe Rails just doesn’t support this yet.

How do I create a url with a named RESTful route that also has  
parameters?

I want to write this:

link\_to\_remote “Show Details”, {:url =\> item\_url(@item, :details =\>  
1), :method =\> :get}

And get this:

Show Detail

Instead I get:

You have a nil object when you didn’t expect it!  
The error occurred while evaluating nil.to\_sym

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/  
active\_support/core\_ext/hash/keys.rb:27:in `symbolize_keys' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ base.rb:518:in`inject’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/  
active\_support/core\_ext/hash/keys.rb:26:in `symbolize_keys' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ helpers/url_helper.rb:21:in`url\_for’  
(eval):19:in `item\_url’

My best workaround has been to do:

link\_to\_remote “Show Details”, {:url =\> item\_url(@item) + “?  
detail=1”, :method =\> :get}

Which doesn’t seem like the Rails way.

I’m not using a route like: items/1;detail and a helper like:  
detail\_item\_url(@item), because I have mutliple parameters which I can  
mix and match to change the view. It creates too many custom named  
routes.

Thanks,  
Ryan
