This project is archived and is in readonly mode.

#4326 ✓resolved
Brad Gessler

URL Generation for routes that point to a Rack application include the controller and action parameters

Reported by Brad Gessler | April 4th, 2010 @ 10:39 PM | in 3.0.2

Given a route file:

SocketChat::Application.routes.draw do |map|
  resources :channels do
    resources :people
    resources :events do
      collection do
        get :socket, :to => SocketController
      end
    end
  end
end

and the URL generation code

socket_channel_events_url(@channel, :scheme => 'ws')

The following is generated:

ws://localhost:3000/channels/4bb8d4c7b0499803fe000002/events/socket?action=show&controller=channels

When I expected:

ws://localhost:3000/channels/4bb8d4c7b0499803fe000002/events/socket

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages