Hi,
I''m trying to use recipe 20 (handle multiple models in one form from
"advanced rails recipes" but I''m hitting the error in the
topic..
I basically try to access /trips/new (it''s supposed to be an e-
commerce solution for a tour operator) but new.html.erb raises:
### ERROR ###
NoMethodError in Trips#new
Showing trips/new.html.erb where line #2 raised:
undefined method `trips_path'' for #<ActionView::Base:0x178f504>
Extracted source (around line #2):
1: <%= error_messages_for :trip %>
2: <% form_for(@trip) do |f| %>
3: <p>name <%= f.text_field :name %></p>
4: <div id="departures">
5: <% render :partial => ''departure'', :collection
=>
@trip.departures %>
### END OF ERROR ###
What could cause the "trips_path" undefined method? I''m
guessing I
forgot something in the controller? I have tried form_for @trip as the
book was suggesting but the error is still there, so I''m guessing
that''s not the problem
So far I''ve been able to find solutions to my errors simply by
googling for the error, but it''s not helpfull enough this time :\
Do you need me to paste some of the controllers or templates?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---