Re: [Rails] "Undefined method"
On 21 August 2012 21:12, Tim Slattery <Slattery_T@bls.gov> wrote:
> I have a controller named RegistriesController. It contains a single
> method:
>
> def edit
> @jolts_registry = JoltsRegistry.new
> end
>
> This runs, and the associated view is invoked. That stops on line 9:
>
> <%= form_for @jolts_registry do |f| %>
>
> The message is:
>
> undefined method `jolts_registries_path' for
> #<#<Class:0x184fdd4>:0x1cf7aa0>
>
> What does that mean?
Have you put an entry for jolts_registries in routes.rb? Probably
something like
resources :jolts_registries
form_for needs the route to generate the form tag.
Colin
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home