diff options
author | thedarkone <thedarkone2@gmail.com> | 2010-09-25 16:15:21 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2010-09-27 17:45:59 +0200 |
commit | 7cee1587f14638e61a33d12114a0d5ae2620d62b (patch) | |
tree | f412ac35ebf05b416fa47b83d2c5f828dcc0cead /actionpack/lib/action_dispatch/routing | |
parent | 77efc20a54708ba37ba679ffe90021bf8a8d3a8a (diff) | |
download | rails-7cee1587f14638e61a33d12114a0d5ae2620d62b.tar.gz rails-7cee1587f14638e61a33d12114a0d5ae2620d62b.tar.bz2 rails-7cee1587f14638e61a33d12114a0d5ae2620d62b.zip |
options[:action] is very likely to be nil.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 2 |
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?) |