ChaelCodes/HuntersKeepers

View on GitHub
app/models/hunter.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [90/80]
Open

  validates :harm, numericality: { less_than_or_equal_to: 7, greater_than_or_equal_to: 0 }
Severity: Minor
Found in app/models/hunter.rb by rubocop

Line is too long. [97/80]
Open

  validates :luck, numericality: { less_than_or_equal_to: MAX_LUCK, greater_than_or_equal_to: 0 }
Severity: Minor
Found in app/models/hunter.rb by rubocop

Line is too long. [119/80]
Open

                                  obj[:value]&.map { |h_improv| h_improv.errors.full_messages.to_sentence }&.join(', ')
Severity: Minor
Found in app/models/hunter.rb by rubocop

Prefer has_many :through to has_and_belongs_to_many.
Open

  has_and_belongs_to_many :gears, join_table: :hunters_gears
Severity: Minor
Found in app/models/hunter.rb by rubocop

This cop checks for the use of the hasandbelongstomany macro.

Example:

# bad
# has_and_belongs_to_many :ingredients

# good
# has_many :ingredients, through: :recipe_ingredients

There are no issues that match your filters.

Category
Status