Skip to content

Commit

Permalink
Revert "Merge pull request #7668 from Draiken/fix_issue_6497"
Browse files Browse the repository at this point in the history
This reverts commit 61d5d2d.

Conflicts:
	actionpack/CHANGELOG.md

REASON: This added a backward incompatible change.
  • Loading branch information
rafaelfranca committed Nov 2, 2012
1 parent de3dff3 commit 4a86362
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
16 changes: 6 additions & 10 deletions actionpack/CHANGELOG.md
@@ -1,5 +1,11 @@
## Rails 3.2.9 (unreleased) ##

* Revert the shorthand routes scoped with `:module` option fix
This added a regression since it is changing the URL mapping.
This makes the stable release backward compatible.

*Rafael Mendonça França*

* Revert the `assert_template` fix to not pass with ever string that matches the template name.
This added a regression since people were relying on this buggy behavior.
This will introduce back #3849 but this stable release will be backward compatible.
Expand Down Expand Up @@ -72,16 +78,6 @@

*Tim Vandecasteele*

* 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*

* Respect `config.digest = false` for `asset_path`

Previously, the `asset_path` internals only respected the `:digest`
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -166,7 +166,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

Expand Down
7 changes: 0 additions & 7 deletions actionpack/test/dispatch/routing_test.rb
Expand Up @@ -362,7 +362,6 @@ def self.call(params, request)
resources :errors, :shallow => true do
resources :notices
end
get 'api/version'
end

scope :path => 'api' do
Expand Down Expand Up @@ -1397,12 +1396,6 @@ def test_match_shorthand_inside_namespace
end
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
with_test_routes do
assert_equal '/replies', replies_path
Expand Down

0 comments on commit 4a86362

Please sign in to comment.