[Rails] Some, but not all, routes not available
I'm encountering a strange issue w/routing. I have the following
routes:
namespace :consumer do
resources :businesses, :only => :show do
resources :events, :only => :show
end
end
And I'm using a presenter object, so I have to manually include the
routes as such:
include Rails.application.routes.url_helpers
now I'm able to access consumer_business_path(some_business)
but I can't use consumer_business_event_path(some_event).
I get the following error:
ActionController::RoutingError Exception: No route matches
{:controller=>"consumer/events", :business_id=><SOME
EVENT>, :action=>"show"}
What gives?
--
You received this message because you are subscribed to the Google Groups "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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home