Rails Routing - Adding more RESTful actions

12 views
Skip to first unread message

AmateurCoder

unread,
Sep 27, 2012, 3:52:34 PM9/27/12
to rubyonra...@googlegroups.com
I have a controller called 'manufacturers_controller.rb' under a name space called 'subscriber'.  Thus, controllers/subscriber/manufacturers_controller.rb.  I have an action in my controller called 'search' and an appropriate view called 'views/subscriber/manufacturers/search.html.erb. 

I've tried writing the route like so,

namespace :subscriber do
  resources :manufacturers do
    get 'search', on: :collection
  end
end

This gives me a stack to deep error.

I've tried match '/subscriber/manufacturers/search' => 'manufacturers#search', via: :get

This give me an uninitialized constant error.

Anyone have any suggestions?  They would be greatly appreciated.

Thanks.
Reply all
Reply to author
Forward
0 new messages