It invokes the show action and not the index action. Why?
It's also doing weird stuff because it hasn't picked a project_id from
the url but it has picked an id. Do you have any other routes that
might be matching this url instead of the ones that you intended to be
used?
It invokes the show action and not the index action. Why?
It's also doing weird stuff because it hasn't picked a project_id from
the url but it has picked an id. Do you have any other routes that
might be matching this url instead of the ones that you intended to be
used?
Fred
Hi Frederick,
I have only the standard REST routes generated by Rails, with
in your path are you sending the project object as params?
>
root :to=> 'projects#index'
"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 this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
begin
@project = Project.find(params[:project_id])
rescue ActiveRecord::RecordNotFound
flash[:error]="The project you were looking for could not be
found"
redirect_to root_path
end