Rubocop autocorrections

This commit is contained in:
James Mason 2018-11-13 18:01:49 -08:00
parent 299738f58d
commit 43bef689fc
85 changed files with 622 additions and 578 deletions

View file

@ -32,7 +32,7 @@ module Admin
def show
@event_schedules = @schedule.event_schedules.eager_load(
room: :tracks,
room: :tracks,
event: [
:difficulty_level,
:track,

View file

@ -57,6 +57,7 @@ module Admin
def sponsorship_level_required
return unless @conference.sponsorship_levels.empty?
redirect_to admin_conference_sponsorship_levels_path(conference_id: @conference.short_title),
alert: 'You need to create atleast one sponsorship level to add a sponsor'
end

View file

@ -14,6 +14,7 @@ module Admin
@conferences_with_role.uniq!
return if @conference.blank?
@versions = PaperTrail::Version.where(conference_id: @conference.id).accessible_by(current_ability)
end

View file

@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
def store_location
# store last url - this is needed for post-login redirect to whatever the user last visited.
return unless request.get?
if (request.path != '/accounts/sign_in' &&
request.path != '/accounts/sign_up' &&
request.path != '/accounts/password/new' &&

View file

@ -15,6 +15,7 @@ class PaymentsController < ApplicationController
if @total_amount_to_pay.zero?
raise CanCan::AccessDenied.new('Nothing to pay for!', :new, Payment)
end
@unpaid_ticket_purchases = current_user.ticket_purchases.unpaid.by_conference(@conference)
end

View file

@ -21,8 +21,8 @@ class PhysicalTicketsController < ApplicationController
format.pdf do
pdf = TicketPdf.new(@conference, @user, @physical_ticket, @ticket_layout, @file_name)
send_data pdf.render,
filename: @file_name,
type: 'application/pdf',
filename: @file_name,
type: 'application/pdf',
disposition: 'attachment'
end
end