Sha256: a4afb36f04a17f83d9c2849f09c311f0b737519a37b26224a323ee51776e1b37

Contents?: true

Size: 219 Bytes

Versions: 78

Compression:

Stored size: 219 Bytes

Contents

require 'active_record'

class Player < ActiveRecord::Base

  belongs_to :user

  validates_presence_of :name, :gold, :user

  def to_hash
    {
      name: name,
      gold: gold,
      userId: user_id,
    }
  end
end

Version data entries

78 entries across 74 versions & 1 rubygems

Version Path
rubypitaya-3.19.6 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.5 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.4 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.3 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.2 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.1 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.19.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.18.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.17.2 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.17.1 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.17.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.16.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.15.3 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.15.2 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.15.1 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.15.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.14.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.13.1 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.13.0 ./lib/rubypitaya/app-template/app/models/player.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/app/models/player.rb