Displaying 1 result from an estimated 1 matches for "thread_path".
Did you mean:
threads_path
2010 May 23
1
[Rails 3] Trouble with named routes and form_for
...tries to use a path involving the string "forum_thread", which doesn''t have a matching route and which I don''t want.
2.) So that''s fine, I figured I''d just use named routes. So I tried this:
<%= form_for @thread, :as => :thread, :url => thread_path(@thread) do |f| %>
....
<% end >
This works for edit actions, but not for new actions. On new I get the following error:
No route matches {:action=>"destroy", :controller=>"forum_thread", :id=>#<ForumThread id: nil, .....>}
3.) So then I tried:
<...