Autocorrect new rubocop offenses
This commit is contained in:
parent
deda3d4273
commit
988b3bf689
24 changed files with 48 additions and 41 deletions
|
|
@ -8,7 +8,7 @@ module Admin
|
|||
|
||||
def index
|
||||
# Redirect to new form if there is no conference
|
||||
if Conference.count == 0
|
||||
if Conference.none?
|
||||
redirect_to new_admin_conference_path
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ module Admin
|
|||
end
|
||||
|
||||
# The conference must have at least 1 organizer
|
||||
if @role.name == 'organizer' && state == 'false' && @role.users.count == 1
|
||||
if @role.name == 'organizer' && state == 'false' && @role.users.one?
|
||||
redirect_to admin_conference_role_path(@conference.short_title, @role.name),
|
||||
error: 'The conference must have at least 1 organizer!'
|
||||
return
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
module Admin
|
||||
class VolunteersController < Admin::BaseController
|
||||
include VolunteersHelper
|
||||
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
|
||||
def index
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
before_action :set_paper_trail_whodunnit
|
||||
include ApplicationHelper
|
||||
|
||||
add_flash_types :error
|
||||
protect_from_forgery with: :exception, prepend: true
|
||||
before_action :store_location
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ class ConferencesController < ApplicationController
|
|||
).order('tracks.name')
|
||||
end
|
||||
if splashpage.include_booths
|
||||
@booths = @conference.confirmed_booths.order('title')
|
||||
@booths = @conference.confirmed_booths.order(:title)
|
||||
end
|
||||
end
|
||||
if splashpage.include_registrations || splashpage.include_tickets
|
||||
@tickets = @conference.tickets.order('price_cents')
|
||||
@tickets = @conference.tickets.order(:price_cents)
|
||||
end
|
||||
if splashpage.include_lodgings
|
||||
@lodgings = @conference.lodgings.order('name')
|
||||
@lodgings = @conference.lodgings.order(:name)
|
||||
end
|
||||
if splashpage.include_sponsors
|
||||
@sponsorship_levels = @conference.sponsorship_levels.eager_load(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue