Parent

Files

RailsBestPractices::Checks::KeepFindersOnTheirOwnModelCheck

Check a model to make sure finders are on their own model.

Implementation: check if :find is called by other model.

Public Instance Methods

evaluate_start(node) click to toggle source
# File lib/rails_best_practices/checks/keep_finders_on_their_own_model_check.rb, line 18
def evaluate_start(node)
  add_error "keep finders on their own model" if others_finder?(node)
end
interesting_files() click to toggle source
# File lib/rails_best_practices/checks/keep_finders_on_their_own_model_check.rb, line 14
def interesting_files
  MODLE_FILES
end
interesting_nodes() click to toggle source
# File lib/rails_best_practices/checks/keep_finders_on_their_own_model_check.rb, line 10
def interesting_nodes
  [:call]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.