Skip to content

Commit

Permalink
Merge pull request #179 from xinminlabs/awesomecode-lint-ruby-style-s…
Browse files Browse the repository at this point in the history
…olenestedconditional-48707

Auto corrected by following Lint Ruby Style/SoleNestedConditional
  • Loading branch information
flyerhzm committed Mar 22, 2021
2 parents 9d9274e + 6a5d3e7 commit cdc7dbe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rails/convert_routes_2_3_to_3_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@
unless %i[root connect resource resources].include? message
url = node.arguments.first.to_value
hash_node = node.arguments.last
if hash_node.type == :hash
if hash_node.key?(:controller)
if hash_node.type == :hash && hash_node.key?(:controller)
if hash_node.key?(:action) || url !~ /:action/
controller_action_name =
if hash_node.key?(:action)
Expand All @@ -348,7 +347,6 @@
replace_with 'match {{arguments}}'
end
end
end
end
end
end
Expand Down

0 comments on commit cdc7dbe

Please sign in to comment.