Sha256: 88466bbd47e22c54c60a98cc662b20615409ba32aa6d6a8701db444f683c48c6

Contents?: true

Size: 182 Bytes

Versions: 91

Compression:

Stored size: 182 Bytes

Contents

class Weapon
  include Mongoid::Document

  field :name

  belongs_to :player, inverse_of: :weapons

  after_build do
    self.name = "Holy Hand Grenade (#{player.frags})"
  end
end

Version data entries

91 entries across 86 versions & 8 rubygems

Version Path
mongoid-7.0.13 spec/app/models/weapon.rb
mongoid-7.0.12 spec/app/models/weapon.rb
mongoid-6.4.8 spec/app/models/weapon.rb
mongoid-7.0.11 spec/app/models/weapon.rb
mongoid-7.0.10 spec/app/models/weapon.rb
mongoid-6.4.7 spec/app/models/weapon.rb
mongoid-6.4.5 spec/app/models/weapon.rb
mongoid-7.0.8 spec/app/models/weapon.rb
mongoid-7.0.7 spec/app/models/weapon.rb
mongoid-7.0.6 spec/app/models/weapon.rb
mongoid-5.4.1 spec/app/models/weapon.rb
mongoid-7.0.5 spec/app/models/weapon.rb
mongoid-7.0.4 spec/app/models/weapon.rb
mongoid-6.4.4 spec/app/models/weapon.rb
mongoid-7.0.3 spec/app/models/weapon.rb
mongoid-6.4.2 spec/app/models/weapon.rb
mongoid-7.0.2 spec/app/models/weapon.rb
mongoid-7.0.1 spec/app/models/weapon.rb
mongoid-6.4.1 spec/app/models/weapon.rb
mongoid-5.4.0 spec/app/models/weapon.rb