aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-11-18 17:36:13 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-11-18 17:38:35 -0500
commitff2fe014d916a2f7c4330ca7208a857bd0ef8992 (patch)
tree39bae164b72e9b9824413fc985244c3347d0b339 /actionpack
parent8106a177a4c72f2ea929c43d4c223e31ab74036d (diff)
parentc79848e1e7c16d36a4af87c317422e17e04cde39 (diff)
downloadrails-ff2fe014d916a2f7c4330ca7208a857bd0ef8992.tar.gz
rails-ff2fe014d916a2f7c4330ca7208a857bd0ef8992.tar.bz2
rails-ff2fe014d916a2f7c4330ca7208a857bd0ef8992.zip
Merge pull request #27089 from erickueen/erickueen_fix_26606
Fix incorrect output from rails routes when using singular resources …
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG.md16
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb10
2 files changed, 16 insertions, 10 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index f477d18c6a..8de47fe9e1 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,11 +1,17 @@
-* Fixes multiple calls to `logger.fatal` instead of a single call,
- for every line in an exception backtrace, when printing trace
+* Fixes incorrect output from rails routes when using singular resources.
+
+ Fixes #26606.
+
+ *Erick Reyna*
+
+* Fixes multiple calls to `logger.fatal` instead of a single call,
+ for every line in an exception backtrace, when printing trace
from `DebugExceptions` middleware.
-
- Fixes #26134
+
+ Fixes #26134.
*Vipul A M*
-
+
* Add support for arbitrary hashes in strong parameters:
```ruby
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index b39d367f7f..4efde09b8b 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1244,11 +1244,11 @@ module ActionDispatch
# the plural):
#
# GET /profile/new
- # POST /profile
# GET /profile
# GET /profile/edit
# PATCH/PUT /profile
# DELETE /profile
+ # POST /profile
#
# === Options
# Takes same options as +resources+.
@@ -1266,15 +1266,15 @@ module ActionDispatch
concerns(options[:concerns]) if options[:concerns]
- collection do
- post :create
- end if parent_resource.actions.include?(:create)
-
new do
get :new
end if parent_resource.actions.include?(:new)
set_member_mappings_for_resource
+
+ collection do
+ post :create
+ end if parent_resource.actions.include?(:create)
end
end