Adds allow_multiple
boolean option to Badge#grant_to
(defaults to
false
). If you used this method to grant a badge it will now grant only if
resource doesn't have the badge.
Use badge.grant_to resource, :allow_multiple => true
where needed.
No changes needed. Adds Mongoid support.
No changes needed. Adds :multiple
boolean option to grant_on
to grant
badge multiple times.
MeritBadgeRules, MeritPointRules and MeritRankRules are now namespaced into Merit module. Move and change:
app/models/merit_{badge|point|rank}_rules.rb -> app/models/merit/{badge|point|rank}_rules.rb
-class Merit{Badge|Point|Rank}Rules - include Merit::{Badge|Point|Rank}Rules +module Merit + class {Badge|Point|Rank}Rules + include Merit::{Badge|Point|Rank}RulesMethods
Add log:string column to merit_actions table.
Rankings are now integer attributes (level), they are not badges anymore. set_rank doesn't accept badge_name anymore.
Badges data is now stored in config/initializers/merit.rb using ambry syntax (not in the DB anymore, as that table needed to be in sync in all development environments).
Added had_errors boolean attribute to merit_actions table.