aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorthedarkone <thedarkone2@gmail.com>2010-09-25 16:15:21 +0200
committerthedarkone <thedarkone2@gmail.com>2010-09-27 17:45:59 +0200
commit7cee1587f14638e61a33d12114a0d5ae2620d62b (patch)
treef412ac35ebf05b416fa47b83d2c5f828dcc0cead /actionpack
parent77efc20a54708ba37ba679ffe90021bf8a8d3a8a (diff)
downloadrails-7cee1587f14638e61a33d12114a0d5ae2620d62b.tar.gz
rails-7cee1587f14638e61a33d12114a0d5ae2620d62b.tar.bz2
rails-7cee1587f14638e61a33d12114a0d5ae2620d62b.zip
options[:action] is very likely to be nil.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
index 02ba5236ee..eaef09d445 100644
--- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
+++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -105,7 +105,7 @@ module ActionDispatch
else [ record_or_hash_or_array ]
end
- inflection = if options[:action].to_s == "new"
+ inflection = if options[:action] && options[:action].to_s == "new"
args.pop
:singular
elsif (record.respond_to?(:persisted?) && !record.persisted?)