Check
Check config/routes.rb to make sure not to use too deep nesting routes.
Implementation: check nested route count, if more than nested_count, then it is needless deep nesting.
# File lib/rails_best_practices/checks/needless_deep_nesting_check.rb, line 23 def evaluate_start(node) if node.message == :resources if node.subject == s(:call, nil, :map, s(:arglist)) @counter = 0 else @counter += 1 add_error "needless deep nesting (nested_count > #{@nested_count})" if @counter >= @nested_count end end end
Generated with the Darkfish Rdoc Generator 2.