1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

options[:action] is very likely to be nil.

This commit is contained in:
thedarkone 2010-09-25 16:15:21 +02:00
parent 77efc20a54
commit 7cee1587f1

View file

@ -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?)