diff --git a/app/controllers/admin/stats_controller.rb b/app/controllers/admin/stats_controller.rb index 758c46f9..b5685bff 100644 --- a/app/controllers/admin/stats_controller.rb +++ b/app/controllers/admin/stats_controller.rb @@ -187,7 +187,7 @@ module Admin total = @conference.events.where(state: mystate).count status = "#{myvar.name}" - percent = 0 + percent = 0 # rubocop:disable Lint/UselessAssignment if value != 0 percent = (value.to_f / total * 100).round(2) result << { 'status' => status, 'value' => value, 'percent' => percent } diff --git a/app/controllers/admin/supporters_controller.rb b/app/controllers/admin/supporters_controller.rb index 6975d5f5..216c2bda 100644 --- a/app/controllers/admin/supporters_controller.rb +++ b/app/controllers/admin/supporters_controller.rb @@ -10,7 +10,7 @@ class Admin::SupportersController < ApplicationController def create params[:supporter_registration][:conference_id] = @conference.id - supporter = SupporterRegistration.create!(params[:supporter_registration]) + SupporterRegistration.create!(params[:supporter_registration]) redirect_to(admin_conference_supporters_path(:conference_id => @conference.short_title), :notice => "Supporter added") end end diff --git a/app/controllers/event_attachments_controller.rb b/app/controllers/event_attachments_controller.rb index 61a76b0b..af6ce3fc 100644 --- a/app/controllers/event_attachments_controller.rb +++ b/app/controllers/event_attachments_controller.rb @@ -52,8 +52,8 @@ class EventAttachmentsController < ApplicationController if !organizer_or_admin? begin - event = current_user.events.find(params[:proposal_id]) - rescue => e + current_user.events.find(params[:proposal_id]) + rescue # They certainly aren't allowed to attach a file to someone else's proposal raise ActionController::RoutingError.new('Invalid proposal') end diff --git a/db/seeds.rb b/db/seeds.rb index 8c47da2c..c01e0fcc 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -10,8 +10,8 @@ Role.create(:name => "Organizer") Role.create(:name => "Admin") qtype_yesno = QuestionType.create(:title => "Yes/No") -qtype_single = QuestionType.create(:title => "Single Choice") -qtype_multiple = QuestionType.create(:title => "Multiple Choice") +QuestionType.create(:title => "Single Choice") +QuestionType.create(:title => "Multiple Choice") answer_yes = Answer.create(:title => "Yes") answer_no = Answer.create(:title => "No")