diff --git a/lib/administrate/view_generator.rb b/lib/administrate/view_generator.rb index 666f11d845..89992ed789 100644 --- a/lib/administrate/view_generator.rb +++ b/lib/administrate/view_generator.rb @@ -21,7 +21,11 @@ def copy_resource_template(template_name) end def resource_path - args.first.try(:underscore).try(:pluralize) || "application" + if args.none? || args.first == "application" + "application" + else + args.first.underscore.pluralize + end end end end