app/models/merit/badge.rb in merit-1.8.0 vs app/models/merit/badge.rb in merit-1.9.0
- old
+ new
@@ -35,11 +35,13 @@
fail ::Merit::BadgeNotFound, str
end
badge
end
- # Last badges granted
+ # DEPRECATED: `last_granted` will be removed from merit, please refer to:
+ # https://github.com/tute/merit/wiki/How-to-show-last-granted-badges
def last_granted(options = {})
+ warn '[merit] [DEPRECATION] `last_granted` will be removed from merit, please refer to: https://github.com/tute/merit/wiki/How-to-show-last-granted-badges'
options[:since_date] ||= 1.month.ago
options[:limit] ||= 10
BadgesSash.last_granted(options)
end