Report abuse

1
2
3
4
5
6
7
8
9
10
11
--- polymorphic_routes.rb (saved version)
+++ (current document)
@@ -13,7 +13,7 @@
 
       inflection =
         case
-        when options[:action] == "new"
+        when options[:action] == "new" || options[:singleton]
           args.pop
           :singular
         when record.respond_to?(:new_record?) && record.new_record?