Class: Merit::PointRules

Inherits:
Object
  • Object
show all
Includes:
PointRulesMethods
Defined in:
lib/generators/merit/templates/merit_point_rules.rb

Instance Method Summary (collapse)

Methods included from PointRulesMethods

#defined_rules, #score

Constructor Details

- (PointRules) initialize



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/generators/merit/templates/merit_point_rules.rb', line 15

def initialize
  # score 10, :on => 'users#update' do
  #   user.name.present?
  # end
  #
  # score 15, :on => 'reviews#create', :to => [:reviewer, :reviewed]
  #
  # score 20, :on => [
  #   'comments#create',
  #   'photos#create'
  # ]
end