Fix remaining rubocop problems
This commit is contained in:
parent
5565d8fb68
commit
ed0f55c45f
3 changed files with 4 additions and 6 deletions
|
|
@ -94,6 +94,9 @@ Style/AndOr:
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Max: 4
|
Max: 4
|
||||||
|
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Max: 550
|
||||||
|
|
||||||
# avoid redundunt curly braces when it is obvious that hash is used
|
# avoid redundunt curly braces when it is obvious that hash is used
|
||||||
Style/BracesAroundHashParameters:
|
Style/BracesAroundHashParameters:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,6 @@ Lint/IneffectiveAccessModifier:
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Max: 75
|
Max: 75
|
||||||
|
|
||||||
# Offense count: 7
|
|
||||||
# Configuration parameters: CountComments.
|
|
||||||
Metrics/ClassLength:
|
|
||||||
Max: 514
|
|
||||||
|
|
||||||
# Offense count: 12
|
# Offense count: 12
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Max: 12
|
Max: 12
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class Registration < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def registration_limit_not_exceed
|
def registration_limit_not_exceed
|
||||||
if self.conference.registration_limit>0 && self.conference.registrations(:reload).count >= self.conference.registration_limit
|
if conference.registration_limit > 0 && conference.registrations(:reload).count >= conference.registration_limit
|
||||||
errors.add(:base, 'Registration limit exceeded')
|
errors.add(:base, 'Registration limit exceeded')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue