mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Merge pull request #7668 from Draiken/fix_issue_6497"
This reverts commitf4ad0ebe7a
, reversing changes made to8b2cbb3a83
. Conflicts: actionpack/CHANGELOG.md REASON: This added introduced a bug when you have a shorthand route inside a nested namespace. See281367eb77
This commit is contained in:
parent
e34d856b8d
commit
1bfc5b4068
3 changed files with 1 additions and 18 deletions
|
@ -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 @@ module ActionDispatch
|
|||
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 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
|||
resources :errors, :shallow => true do
|
||||
resources :notices
|
||||
end
|
||||
get 'api/version'
|
||||
end
|
||||
|
||||
scope :path => 'api' do
|
||||
|
@ -1301,12 +1300,6 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue