Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 756 Bytes
I am attempting to use nested resources for namespaced models
Steps:
(using ruby 1.9.2 with bundler gem installed)
bundle
rake db:migrate
rails s
navigate to http://localhost:3000/blog/posts
click New Post
Give it a name, click Create Post
Click Add comment
error: undefined method `blog_post_blog_comments_path'
The problem seems to be in the call to form_for in
app/views/blog/comments/_form.html.erb
It is trying to call blog_post_blog_comments_path, even though
'rake routes' tells us the correct helper is blog_post_comments_path
I want to keep my models/controllers namespaced (Blog::).
I want to keep the comments routes nested under posts.
What do I need to change, in either config/routes.rb, or
the invocations of the helpers in the views?
Something went wrong with that request. Please try again.