Fix Rubocop issues
This commit is contained in:
parent
f67c4aafe0
commit
21e282679f
17 changed files with 50 additions and 33 deletions
|
|
@ -68,6 +68,8 @@ class Ability
|
|||
end
|
||||
|
||||
# Abilities for signed in users
|
||||
# TODO: Refactor into multiple functions
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def signed_in(user)
|
||||
# Abilities from not_signed_in user are also inherited
|
||||
not_signed_in
|
||||
|
|
@ -140,6 +142,7 @@ class Ability
|
|||
user == track.submitter && !(track.accepted? || track.confirmed?)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
# Abilities for users with roles wandering around in non-admin views.
|
||||
def common_abilities_for_admins(user)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Commercial < ApplicationRecord
|
|||
begin
|
||||
resource = OEmbed::Providers.get(url, maxwidth: 560, maxheight: 315)
|
||||
{ html: resource.html.html_safe }
|
||||
rescue StandardError => exception
|
||||
rescue StandardError
|
||||
{ html: iframe_fallback(url) }
|
||||
# { error: exception.message }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#
|
||||
# index_conferences_on_organization_id (organization_id)
|
||||
#
|
||||
# rubocop:disable Metrics/ClassLength
|
||||
class Conference < ApplicationRecord
|
||||
include RevisionCount
|
||||
require 'uri'
|
||||
|
|
@ -1234,3 +1235,4 @@ class Conference < ApplicationRecord
|
|||
]
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/ClassLength
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ class User < ApplicationRecord
|
|||
# TODO: Use a real authorization in the right place....
|
||||
def manages_volunteers?(conference)
|
||||
organizer_roles = get_roles['organizer']
|
||||
organizer_roles&.include?(conference.short_title) # TODO or Volunteer Coorinator.
|
||||
organizer_roles&.include?(conference.short_title) # TODO: or Volunteer Coorinator.
|
||||
end
|
||||
|
||||
def registered
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue