class RailsBestPractices::Reviews::MoveCodeIntoModelReview

Review a view file to make sure there is no complex logic call for model.

See the best practice details here rails-bestpractices.com/posts/2010/07/24/move-code-into-model/

Implementation:

Review process:

check if, unless, elsif there are multiple method calls or attribute assignments apply to one receiver,
and the receiver is a variable, then they should be moved into model.

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/rails_best_practices/reviews/move_code_into_model_review.rb, line 19
def initialize(options = {})
  super(options)
  @use_count = options['use_count'] || 2
end