Sha256: 84cbbcd8a239af87dd201bbad0de587c81515fac1ab5c5228515e6d5d260be5e
Contents?: true
Size: 867 Bytes
Versions: 13
Compression:
Stored size: 867 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#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
13 entries across 13 versions & 1 rubygems