diff --git a/lib/flame/router/routes_refine/mounting.rb b/lib/flame/router/routes_refine/mounting.rb index e36233d..8b74feb 100644 --- a/lib/flame/router/routes_refine/mounting.rb +++ b/lib/flame/router/routes_refine/mounting.rb @@ -47,10 +47,8 @@ def mount_nested_controller(nested_controller) def should_be_mounted?(controller) if controller.instance_of?(Module) controller.const_defined?(:IndexController, false) - elsif controller.actions.empty? || @reverse_routes.key?(controller.to_s) - false else - true + controller.actions.any? && !@reverse_routes.key?(controller.to_s) end end end