Excerpts from Leonardo Mateo's message of Tue Feb 22 17:12:06 -0800 2011:
> On Mon, Feb 21, 2011 at 2:15 PM, David J. Hamilton <[email protected]> wrote:
> > Excerpts from Phil Crissman's message of Sun Feb 20 15:14:45 -0800 2011:
> >> > Started POST "/items/28/price" for 127.0.0.1 at 2011-02-20 18:52:10 -0300
> >> >
> >> > ActionController::RoutingError (No route matches "/items/28/price"):
> >> First check: is this route listed when you do `rake routes | grep price` ?
> >
> > Second check: Confirm that your form really does have method=POST.
> Yes, it does. Anyway, I've just changed it to use the update action,
> it makes more sense anyway.
> However, I still don't understand why it is happening.

Something I should have been more clear about:  you want to make sure that your
form element has its method attribute set to post, but you will also need to
check that it does not have a hidden parameter generated by rails named _method
with a value of, e.g. put.

Unfortunately when you make this mistake of specifying a post route in
config/routes but accidentally submitting to a synthetic "put" (very easy to do
if using +form_for+), the log will still read “Started POST” and you will be
given no indication of the problem.
-- 
med vänlig hälsning
David J. Hamilton

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to