Hi all,

I was using request.route and I figured out a problem... I am not sure
if it's a bug...

In my router, I have:

resources :companies do
  collection :do_something, :method => :post # whatever the :post.. it
fails also with a get
end

Looking at dm-core code, I figured out that the collection route is
added to the routes before the show route.
The problem... is that the two routes (collection and show) end up the
same route index.

The route returned by Router#route_for is then returning the wrong
route...

More info at: http://gist.github.com/35720

I temporarily fixed the bug in my merb-core copy by moving the line
creating the show route of the resource after the collection/member
custom routes and I removed the before(placeholder) that is making the
duplicate index.

Can someone look into that and tell me if I should not use
request.route or if it will be fixed?

Maxime
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to