Skip to content

Commit

Permalink
Resolve new RuboCop offense
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWayfer committed Feb 6, 2021
1 parent d276469 commit c8358fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/flame/router/routes_refine/mounting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c8358fd

Please sign in to comment.