On 15 Sep 2011, at 22:56, theLemcke
<sixtimesnine-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 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?
It''s expecting you to supply the business and the event. Since
you''ve only supplied the event, it doesn''t know what to do
Fred>
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.