mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
Fix unreachable code (#1140) in ConferenceRegistrationController#new
Remove the unreachable code from ConferenceRegistrationController#new Rework the error message logic in ConferenceRegistrationController#new Fix redirect to #edit when the user is registered Refactor ConferenceRegistrationController#new spec and add more tests
This commit is contained in:
parent
b46a721a7d
commit
88e1646e87
3 changed files with 215 additions and 52 deletions
|
|
@ -46,7 +46,7 @@ class ApplicationController < ActionController::Base
|
|||
rescue_from CanCan::AccessDenied do |exception|
|
||||
Rails.logger.debug "Access denied on #{exception.action} #{exception.subject.inspect}"
|
||||
message = exception.message
|
||||
message << ' Maybe you need to sign in?' unless current_user
|
||||
message << ' Maybe you need to sign in?' unless @ignore_not_signed_in_user || current_user
|
||||
redirect_to root_path, alert: message
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue