Parent

Files

RailsBestPractices::Checks::MoveCodeIntoControllerCheck

Check a view file to make sure there is no finder.

Implementation: Check if view file contains finder, then the code should move to controller.

Constants

FINDER

Public Instance Methods

evaluate_start(node) click to toggle source
# File lib/rails_best_practices/checks/move_code_into_controller_check.rb, line 20
def evaluate_start(node)
  add_error "move code into controller" if finder?(node)
end
interesting_files() click to toggle source
# File lib/rails_best_practices/checks/move_code_into_controller_check.rb, line 16
def interesting_files
  VIEW_FILES
end
interesting_nodes() click to toggle source
# File lib/rails_best_practices/checks/move_code_into_controller_check.rb, line 12
def interesting_nodes
  [:call]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.