Class: Rankit::Score

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
ActiveModel::ForbiddenAttributesProtection
Defined in:
app/models/rankit/score.rb

Constant Summary collapse

SCORE_RANGE =
(0..5)

Instance Method Summary collapse

Instance Method Details

#update_rankable_scoreObject



13
14
15
16
# File 'app/models/rankit/score.rb', line 13

def update_rankable_score
  rankable.recalculate_average_score
  rankable.save
end