# Routing method problem

**URL:** <https://www.ruby-forum.com/t/routing-method-problem/165489>\
**Category:** Rails\
**Created:** [April 14, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/routing-method-problem/165489 "2009-04-14T14:52:44Z")\
**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, 2:52pm UTC](https://www.ruby-forum.com/t/routing-method-problem/165489/1 "2009-04-14T14:52:44Z")

</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  
actionse$B!)e(B  
Thanks!
