Permalink
Browse files

Revert "Merge pull request #7668 from Draiken/fix_issue_6497"

This reverts commit f4ad0eb, reversing
changes made to 8b2cbb3.

Conflicts:
	actionpack/CHANGELOG.md

REASON: This added introduced a bug when you have a shorthand route
inside a nested namespace.

See
rafaelfranca@281367e
  • Loading branch information...
1 parent e34d856 commit 1bfc5b4068238bcd82f0ed78351c97fec39e775a @rafaelfranca rafaelfranca committed Nov 2, 2012
@@ -139,16 +139,6 @@
*Tima Maslyuchenko*
-* Fixed a bug with shorthand routes scoped with the `:module` option not
- adding the module to the controller as described in issue #6497.
- This should now work properly:
-
- scope :module => "engine" do
- get "api/version" # routes to engine/api#version
- end
-
- *Luiz Felipe Garcia Pereira*
-
* Sprockets integration has been extracted from Action Pack to the `sprockets-rails`
gem. `rails` gem is depending on `sprockets-rails` by default.
@@ -182,7 +182,7 @@ def default_controller_and_action(to_shorthand=nil)
controller ||= default_controller
action ||= default_action
- unless controller.is_a?(Regexp)
+ unless controller.is_a?(Regexp) || to_shorthand
controller = [@scope[:module], controller].compact.join("/").presence
end
@@ -363,7 +363,6 @@ def self.call(params, request)
resources :errors, :shallow => true do
resources :notices
end
- get 'api/version'
end
scope :path => 'api' do
@@ -1301,12 +1300,6 @@ def test_match_shorthand_inside_namespace
assert_equal 'account#shorthand', @response.body
end
- def test_match_shorthand_with_module
- assert_equal '/api/version', api_version_path
- get '/api/version'
- assert_equal 'api/api#version', @response.body
- end
-
def test_dynamically_generated_helpers_on_collection_do_not_clobber_resources_url_helper
assert_equal '/replies', replies_path
end

0 comments on commit 1bfc5b4

Please sign in to comment.