lib/merit/rule.rb
# Grant badge if rule applies. If it doesn't, and the badge is temporary,
# then remove it.
Grant badge if rule applies. If it doesn't, and the badge is temporary,
then remove it.
Grant badge if rule applies . If it doesn ' t and the badge is temporary then remove it .
def grant_or_delete_badge(action)
      if sash = sash_to_badge(action)
        if applies? action.target_object(model_name)
          badge.grant_to sash
        elsif temporary?
          badge.delete_from sash
        end
      else
        Rails.logger.warn "[merit] no sash found on Rule#grant_or_delete_badge"
      end
    end
def grant_or_delete_badge ( action ) if sash = sash_to_badge ( action ) if applies? action . target_object ( model_name ) badge . grant_to sash elsif temporary? badge . delete_from sash end else Rails . logger . warn "[merit] no sash found on Rule#grant_or_delete_badge" end end
Grant badge if rule applies.
Grant badge if rule applies .
action
<not_specific>