Fix linting cops
This commit is contained in:
parent
056fe5ec3f
commit
31212b4f1c
4 changed files with 6 additions and 6 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue