Sha256: ba04fd1dcdfa68f03e4fbc8c00b7b1e42cc03cca783e99f7b99eb0667cd3cc95
Contents?: true
Size: 808 Bytes
Versions: 22
Compression:
Stored size: 808 Bytes
Contents
# Be sure to restart your server when you modify this file. # # Points are a simple integer value which are given to "meritable" resources # according to rules in +app/models/merit/point_rules.rb+. They are given on # actions-triggered, either to the action user or to the method (or array of # methods) defined in the +:to+ option. # # 'score' method may accept a block which evaluates to boolean # (recieves the object as parameter) module Merit class PointRules include Merit::PointRulesMethods 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 end end
Version data entries
22 entries across 22 versions & 1 rubygems