Class: Rating

Inherits:
ApplicationRecord show all
Defined in:
app/models/rating.rb

Overview

The ratings/attributes that the Hunter has determines their capability to do something

Schema Information

Table name: ratings

Indexes

index_ratings_on_playbook_id  (playbook_id)

Foreign Keys

fk_rails_...  (playbook_id => playbooks.id)

Constant Summary collapse

LIST =
%i[charm cool sharp tough weird].freeze

Instance Attribute Summary collapse

Method Summary

Methods inherited from ApplicationRecord

policy_class

Instance Attribute Details

#charmInteger

Returns:

  • (Integer)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#coolInteger

Returns:

  • (Integer)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#created_atTime

Returns:

  • (Time)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#idObject

Returns [].

Returns:


36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#playbook_idObject

Returns [].

Returns:


36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#sharpInteger

Returns:

  • (Integer)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#toughInteger

Returns:

  • (Integer)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#updated_atTime

Returns:

  • (Time)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end

#weirdInteger

Returns:

  • (Integer)

36
37
38
39
40
41
# File 'app/models/rating.rb', line 36

class Rating < ApplicationRecord
  LIST = %i[charm cool sharp tough weird].freeze

  belongs_to :playbook, dependent: :destroy
  validates(*LIST, presence: true, numericality: true)
end