Sha256: a399d6de8ed338e19f44cd1fce899b22ba1eb92880df2fd3b0378d17d4a4ca3f

Contents?: true

Size: 256 Bytes

Versions: 5

Compression:

Stored size: 256 Bytes

Contents

class Sash
  include Mongoid::Document
  include Mongoid::Timestamps

  field :badge_ids, type: Array, default: []

  def add_badge(badge_id)
    self.push(:badge_ids, badge_id)
  end

  def rm_badge(badge_id)
    self.pull(:badge_ids, badge_id)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merit-1.7.1 lib/merit/models/mongoid/sash.rb
merit-1.7.0 lib/merit/models/mongoid/sash.rb
merit-1.6.2 lib/merit/models/mongoid/sash.rb
merit-1.6.1 lib/merit/models/mongoid/sash.rb
merit-1.6.0 lib/merit/models/mongoid/sash.rb