Wednesday, August 22, 2012

[Rails] Re: "Undefined method"

Tim Slattery <Slattery_T@bls.gov> wrote:

>Colin Law <clanlaw@googlemail.com> wrote:
>
>
>>> Don't understand, which route?
>>
>>You are trying to create a form for a JoltRegistry, that expects to
>>submit to a jolts_registries_path (as in the error message). The
>>normal way to generate the route would be to use
>>resources :jolts_registries
>
>I've done that. Same message. I've tried several different
>permutations of methods, etc. Always the exact same message. I have no
>clue in the world what in the hell it wants me to do. I have no clue
>where it gets "jolts_registries" from in the first place.

Changing the form tag from

<%= form_for @registry do |f| %>

to

<%= form_for @registry, :url => { :action => "create" } do |f| %>

fixed it.

--
Tim Slattery
Slattery_T@bls.gov

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment