lib/generators/madmin/resource/resource_generator.rb in madmin-1.2.0 vs lib/generators/madmin/resource/resource_generator.rb in madmin-1.2.1

- old
+ new

@@ -18,10 +18,10 @@ template("controller.rb", destination) end def generate_route if route_namespace_exists? - route "resources :#{plural_name}", namespace: class_path, indentation: 4, sentinel: /namespace :madmin do\s*\n/m + route "resources :#{plural_name}", namespace: class_path, indentation: separated_routes_file? ? 2 : 4, sentinel: /namespace :madmin do\s*\n/m else route "resources :#{plural_name}", namespace: [:madmin] + class_path end end