Skip to content
This repository

url_for(:controller => 'un_existing', :action => 'show) returns /assets url in 3.2 #6459

Closed
betelgeuse opened this Issue May 23, 2012 · 3 comments

3 participants

Petteri Räty Piotr Sarnacki Aaron Patterson
Petteri Räty

In an application without FooController:

url_for(:controller => 'foo', :action => 'show')

In rails 3.1 this raises ActionController::RoutingError

In rails 3.2 you get an url returned:

/assets?action=show&controller=foo

The rails 3.1 result seems the proper one.

@tenderlove Is this a regression in journey?

Piotr Sarnacki
Collaborator
drogus commented June 02, 2012

This is rather not regression in journey, as the problem is that assets engine catches this route. If you disable assets you will see RoutingError as in the 3.1 application. I will check why exactly assets catch that route.

Piotr Sarnacki
Collaborator
drogus commented June 13, 2012

Just a quick update. I haven't had time to work on this, but my previous comment is stupid :) It is regression in journey, as it's during generation. Sorry for confusion.

Aaron Patterson
Owner

Should be fixed here.

Thanks for reporting this!

Aaron Patterson tenderlove closed this June 14, 2012
Jonathan Perkin jperkin referenced this issue from a commit in joyent/pkgsrc June 15, 2012
Update ruby-journey to 1.0.4.
Thu Jun 14 14:03:22 2012  Aaron Patterson <aaron@tenderlovemaking.com>

	* lib/journey/formatter.rb: when generating routes, skip route
          literals (routes that do not have replacement values like
          "/:controller") when matching unnamed routes.

            rails/rails#6459

        * test/test_router.rb: corresponding test
5447cb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.