Sha256: e606868878d3c817c9d2efbd9701c6a5bbe7a4a8e5b8cc70637923c9ec7dae22
Contents?: true
Size: 325 Bytes
Versions: 1
Compression:
Stored size: 325 Bytes
Contents
class BadgesSash < ActiveRecord::Base belongs_to :sash def self.last_granted(options = {}) options[:since_date] ||= 1.month.ago options[:limit] ||= 10 where("created_at > '#{options[:since_date]}'"). limit(options[:limit]). map(&:badge) end def badge Badge.find(badge_id) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
merit-1.4.0 | lib/merit/models/active_record/badges_sash.rb |