ChaelCodes/HuntersKeepers

View on GitHub

Showing 57 of 106 total issues

Line is too long. [114/80]
Open

  json.available_improvements hunter.available_improvements, partial: 'improvements/improvement', as: :improvement

Line is too long. [105/80]
Open

          redirect_to hunter_hunters_improvement_url(hunter_id: @hunter.id, id: @hunters_improvement.id),

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

Line is too long. [92/80]
Open

  # @param playbook_id [Integer] References the id of the Playbook in the the Playbook table

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. [83/80]
Open

  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
Severity: Minor
Found in Gemfile 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

Line is too long. [93/80]
Open

    params.require(:gear).permit(:name, :description, :harm, :armor, :playbook_id, :tag_list)
Severity: Minor
Found in app/controllers/gears_controller.rb by rubocop

Line is too long. [109/80]
Open

                 location: hunter_hunters_improvement_url(hunter_id: @hunter.id, id: @hunters_improvement.id)

Line is too long. [109/80]
Open

                 location: hunter_hunters_improvement_url(hunter_id: @hunter.id, id: @hunters_improvement.id)

Line is too long. [95/80]
Open

  # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
Severity: Minor
Found in bin/setup by rubocop

Line is too long. [82/80]
Open

        format.json { render json: @hunter.errors, status: :unprocessable_entity }

Line is too long. [91/80]
Open

      format.html { redirect_to hunters_url, notice: 'Hunter was successfully destroyed.' }

Line is too long. [87/80]
Open

        format.json { render json: @improvement.errors, status: :unprocessable_entity }

Line is too long. [82/80]
Open

  # Most jobs are safe to ignore if the underlying records are no longer available
Severity: Minor
Found in app/jobs/application_job.rb by rubocop

Line is too long. [112/80]
Open

json.array! @hunters_improvements, partial: 'hunters_improvements/hunters_improvement', as: :hunters_improvement

Line is too long. [100/80]
Open

        format.html { redirect_to hunter_path(@hunter), notice: 'Hunter was successfully created.' }
Severity
Category
Status
Source
Language