hpi-schuelerklub/workshop-portal

View on GitHub
app/models/request.rb

Summary

Maintainability
A
0 mins
Test Coverage

%i-literals should be delimited by [ and ].
Open

  enum form_of_address: %i(mr mrs prefer_to_omit)
Severity: Minor
Found in app/models/request.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Symbol with a boolean name - you probably meant to use true.
Open

  validates :number_of_participants, numericality: { only_integer: true, greater_than: 0 }, allow_nil: :true
Severity: Minor
Found in app/models/request.rb by rubocop

This cop checks for :true and :false symbols. In most cases it would be a typo.

Example:

# bad
:true

# good
true

Example:

# bad
:false

# good
false

%i-literals should be delimited by [ and ].
Open

  enum status: %i(open accepted declined) # per database declaration, the first value is default
Severity: Minor
Found in app/models/request.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Symbol with a boolean name - you probably meant to use true.
Open

  validates :number_of_participants_with_previous_knowledge, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, allow_nil: :true
Severity: Minor
Found in app/models/request.rb by rubocop

This cop checks for :true and :false symbols. In most cases it would be a typo.

Example:

# bad
:true

# good
true

Example:

# bad
:false

# good
false

There are no issues that match your filters.

Category
Status