Sha256: 973eaa7634df44f5f45f99d43e3d619b853a19ebb9ffe21d0ca1bf783f6c5e8d
Contents?: true
Size: 887 Bytes
Versions: 15
Compression:
Stored size: 887 Bytes
Contents
### QALAM_MERIT ### # 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#create' do |user| # user.bio.present? # end # # score 15, :on => 'reviews#create', :to => [:reviewer, :reviewed] # # score 20, :on => [ # 'comments#create', # 'photos#create' # ] # # score -10, :on => 'comments#destroy' end end end
Version data entries
15 entries across 15 versions & 1 rubygems