Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix controller_class_name for anonymous controllers. #6053

Closed
wants to merge 1 commit into from

4 participants

@mschuerig

TestCase#process generates an incorrect controller_class_name for anonymous classes. The name has a "_controller" suffix, which ought not to be there. This change simply removes that suffix.

@josevalim
Owner

Can we have a test pls?

@mschuerig
@pixeltrix
Owner

Whilst I agree that the controller suffix shouldn't be there, how is it breaking things for you? Changing it now may break some people's tests and I've been burned for that in the past

@mschuerig
@josevalim
Owner
@pixeltrix pixeltrix referenced this pull request from a commit
@pixeltrix pixeltrix Add failing test case for #6053 1c7bcde
@pixeltrix
Owner

@josevalim backport?

@pixeltrix
Owner

Fixed by 529a3ee - not backporting as it may break things

@pixeltrix pixeltrix closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 29, 2012
  1. @mschuerig
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_controller/test_case.rb
View
2  actionpack/lib/action_controller/test_case.rb
@@ -472,7 +472,7 @@ def process(action, http_method = 'GET', *args)
parameters ||= {}
controller_class_name = @controller.class.anonymous? ?
- "anonymous_controller" :
+ "anonymous" :
@controller.class.name.underscore.sub(/_controller$/, '')
@request.assign_parameters(@routes, controller_class_name, action.to_s, parameters)
Something went wrong with that request. Please try again.