Skip to content

Commit

Permalink
options[:action] is very likely to be nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedarkone committed Sep 27, 2010
1 parent 77efc20 commit 7cee158
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -105,7 +105,7 @@ def polymorphic_url(record_or_hash_or_array, options = {})
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?)
Expand Down

0 comments on commit 7cee158

Please sign in to comment.