I'm having a problem with understanding how RESTFUL resources works in Rails 3. If I have in my rails routes.rb file:
resources :my_foos do
member do
get 'foo_bar'
end
end
I have a controller file my_foos_controller.rb
class MyFoosController < ApplicationController
def index
end
def foo_bar
end
end
I have a view file test.html.erb
<%= foo_bar_my_foos_path %>
When I try to display my test.html.erb file, I get an error: as in the title.
Everything I've described to you works if I'm dealing with a resource ( singular ) but not with the plural resources. Am I missing something in the convention?
Thanks
Use rake routes from the command line to display your routes. The leftmost part of each route is the name of the route. Append _path to get it working.