mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 13:44:09 +00:00
Fix others additional lints
This commit is contained in:
parent
763f864dc9
commit
056fe5ec3f
18 changed files with 33 additions and 34 deletions
|
|
@ -9,7 +9,7 @@ class Admin::DietchoicesController < ApplicationController
|
|||
begin
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_dietary_list_path(:conference_id => @conference.short_title), :notice => 'Dietary choices were successfully updated.')
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_to(admin_conference_dietary_list_path(:conference_id => @conference.short_title), :alert => "Dietary choices update failed: #{e.message}")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Admin::EventtypesController < ApplicationController
|
|||
redirect_to(admin_conference_eventtypes_path(
|
||||
conference_id: @conference.short_title),
|
||||
notice: 'Event types were successfully updated.')
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_to(admin_conference_eventtypes_path(
|
||||
conference_id: @conference.short_title),
|
||||
alert: "Event types update failed: #{e.message}")
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ module Admin
|
|||
@registration.update_attributes!(params[:registration])
|
||||
flash[:success] = "Successfully updated registration for #{@user.name} #{@user.email}"
|
||||
redirect_to(admin_conference_registrations_path(@conference.short_title))
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
Rails.logger.debug e.backtrace.join("\n")
|
||||
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||
alert: 'Failed to update registration:' + e.message)
|
||||
|
|
@ -104,7 +104,7 @@ module Admin
|
|||
begin registration.destroy
|
||||
redirect_to admin_conference_registrations_path
|
||||
flash[:notice] = "Deleted registration for #{user.name} #{user.email}"
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
Rails.logger.debug e.backtrace.join("\n")
|
||||
redirect_to(admin_conference_registrations_path(@conference.short_title),
|
||||
alert: 'Failed to delete registration:' + e.message)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class Admin::SupporterLevelsController < ApplicationController
|
|||
begin
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_supporter_levels_path(:conference_id => @conference.short_title), :notice => 'Supporter levels were successfully updated.')
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_to(admin_conference_supporter_levels_path(:conference_id => @conference.short_title), :alert => "Supporter levels update failed: #{e.message}")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Admin::VolunteersController < ApplicationController
|
|||
begin
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_volunteers_info_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_to(admin_conference_volunteers_info_path(:conference_id => params[:conference_id]), :alert => "Volunteering options update failed: #{e.message}")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class ConferenceRegistrationController < ApplicationController
|
|||
else
|
||||
registration.update_attributes!(registration_params)
|
||||
end
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
Rails.logger.debug e.backtrace.join('\n')
|
||||
redirect_to(register_conference_path(id: conference.short_title),
|
||||
alert: 'Registration failed:' + e.message)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class EventAttachmentsController < ApplicationController
|
|||
if !organizer_or_admin?
|
||||
begin
|
||||
event = current_user.events.find(params[:proposal_id])
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
# They certainly aren't allowed to attach a file to someone else's proposal
|
||||
raise ActionController::RoutingError.new('Invalid proposal')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ProposalController < ApplicationController
|
|||
else
|
||||
@event = Event.find(params[:id])
|
||||
end
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
Rails.logger.debug("Proposal failure in verify_access: #{e.message}")
|
||||
redirect_to(conference_proposal_index_path(conference_id: @conference.short_title),
|
||||
alert: 'Invalid or uneditable proposal.')
|
||||
|
|
@ -91,7 +91,7 @@ class ProposalController < ApplicationController
|
|||
event.update_attributes!(params[:event])
|
||||
redirect_to(conference_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: "'#{event.title}' was successfully updated.")
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_to edit_conference_proposal_path(@conference.short_title, @event), alert: e.message
|
||||
end
|
||||
end
|
||||
|
|
@ -131,7 +131,7 @@ class ProposalController < ApplicationController
|
|||
|
||||
begin
|
||||
@event.save!
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
@url = conference_proposal_index_path(@conference.short_title)
|
||||
@event_types = @conference.event_types
|
||||
@user = current_user
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module Users
|
|||
|
||||
sign_in user
|
||||
redirect_to root_path, notice: user.email + " signed in successfully with #{provider}"
|
||||
rescue Exception => e
|
||||
rescue => e
|
||||
redirect_back_or_to new_user_registration_path, alert: 'Failed' + e.message
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue