Button_to results in wrong route?

Hi, all,

Newbie question.

When using button_to, the browser navigates to a proper URL (http://
localhost:3000/sites/6/edit, for example), but I get a “No action
responded to 6” error. Looking in the log, I see “Processing
SitesController#6” instead of Processing SitesController#edit".

The problem goes away when I use link_to, or if I type the URL by
hand.

Any ideas? In advance, thanks.

post some code that you are using.

Hi eichlerguy

The differnce is button_to generates a form with method post in your 

case and link_to generates a link with method put in this case.And
link_to is the one you want here

Sijo