Why would I be receiving a NoMethoError when I try to go to the trips edit form?
edit.erb
Edit <%= @trip.location %>
<%= button_to "Delete trip", trip_path(@trip), method: :delete %>
<%= link_to "Cancel", trip_path(@trip) %>
trips_controller.rb
def update
if @trip.update(trip_params)
redirect_to trip_path(@trip)
else
render :edit
end
end
Could you share the link to your code and exact error message? Without them we can just guess, not dig into the problem.