Check a view file to make sure there is no complex logic call for model.
Implementation: Check if a local variable or instance variable called more than 3 times in if conditional statement, then it should more code into model.
# File lib/rails_best_practices/checks/move_code_into_model_check.rb, line 18 def evaluate_start(node) @variables = {} node.conditional_statement.grep_nodes(:node_type => :call).each { |call_node| remember_call(call_node) } check_errors end
Generated with the Darkfish Rdoc Generator 2.