# Routing method problem

**URL:** <https://www.ruby-forum.com/t/routing-method-problem/165472>\
**Category:** Rails\
**Created:** [April 14, 2009, 10:58am UTC](https://www.ruby-forum.com/t/routing-method-problem/165472 "2009-04-14T10:58:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackyang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jackyang](https://www.ruby-forum.com/u/jackyang)\
**Post date:** [April 14, 2009, 10:58am UTC](https://www.ruby-forum.com/t/routing-method-problem/165472/1 "2009-04-14T10:58:26Z")

</div>

I have two named routes:  
map.edit\_setting ‘setting/:key’, :controller =\> ‘settings’, :action =\>  
‘edit’, :method =\> :get  
map.update\_setting ‘setting/:key’, :controller =\> ‘settings’, :action =\>  
‘update’,  
:method =\> :put

And I have to link\_to\_remote links:  
link\_to\_remote “Edit”, :url =\> edit\_setting\_path(@setting.key), :method  
=\> :get  
link\_to\_remote “Save”, :url =\> update\_setting\_path(@setting.key),  
:method =\> :put

But both link will trigger the :edit action. It seems Rails ignores the  
:method parameter when routing.

How can I map the same url with different method to different actionsï¼Ÿ  
Thanks!
