Skip to content

Commit bda5b6e

Browse files
committed
Made rubocop happy
1 parent 6f7ce4c commit bda5b6e

File tree

12 files changed

+13
-15
lines changed

12 files changed

+13
-15
lines changed

app/models/identifier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def value=(val)
7979
base += '/' unless base.ends_with?('/')
8080
super("#{base}#{val.to_s.strip}")
8181
else
82-
super(val)
82+
super
8383
end
8484
end
8585
# rubocop:enable Metrics/AbcSize

app/models/language.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def abbreviation=(value)
5555
value = '' if value.nil?
5656
value = value.downcase
5757
if value.blank? || value =~ /\A[a-z]{2}\Z/i
58-
super(value)
58+
super
5959
else
6060
super(LocaleService.to_i18n(locale: value).to_s)
6161
end

app/models/org.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class Org < ApplicationRecord
141141
before_validation :check_for_missing_logo_file
142142

143143
# This gives all managed orgs api access whenever saved or updated.
144-
before_save :ensure_api_access, if: ->(org) { org.managed? }
144+
before_save :ensure_api_access, if: lambda(&:managed?)
145145

146146
# If the physical logo file is no longer on disk we do not want it to prevent the
147147
# model from saving. This typically happens when you copy the database to another

app/models/section.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Section < ApplicationRecord
6868
def phase_id=(value)
6969
phase = Phase.where(id: value).first
7070
self.number = (phase.sections.where.not(id: id).maximum(:number).to_i + 1) if phase.present?
71-
super(value)
71+
super
7272
end
7373

7474
# =====================

app/models/template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Template < ApplicationRecord
109109
# overwriting the accessors. We want to ensure this template is published
110110
# before we remove the published_version
111111
# That being said, there's a potential race_condition where we have multiple-published-versions
112-
after_update :reconcile_published, if: ->(template) { template.published? }
112+
after_update :reconcile_published, if: lambda(&:published?)
113113

114114
# ==========
115115
# = Scopes =

app/policies/api/v0/guidance_group_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(user, guidance_group)
1111
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
1212
end
1313

14-
super(user, guidance_group)
14+
super
1515
end
1616

1717
##

app/policies/api/v0/guidance_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(user, guidance)
1111
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
1212
end
1313

14-
super(user, guidance)
14+
super
1515
end
1616

1717
##

app/policies/api/v0/plans_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(user, plan)
1111
raise Pundit::NotAuthorizedError, _('must have access to plans api')
1212
end
1313

14-
super(user, plan)
14+
super
1515
end
1616

1717
##

app/policies/api/v0/statistics_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(user, statistic)
1111
raise Pundit::NotAuthorizedError, _('must have access to guidances api')
1212
end
1313

14-
super(user, statistic)
14+
super
1515
end
1616

1717
##

app/policies/api/v0/template_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize(user, template)
99
raise Pundit::NotAuthorizedError, _('must have access to templates api')
1010
end
1111

12-
super(user, template)
12+
super
1313
end
1414

1515
##

0 commit comments

Comments
 (0)