mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
style: if ! changed by unless
- if ! changed by unless as it is more readable - !object.blank? is equivalent to object.present?, also more readable
This commit is contained in:
parent
96155eb87f
commit
7e5d20c89d
18 changed files with 27 additions and 28 deletions
|
|
@ -47,7 +47,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?' if !current_user
|
||||
message << ' Maybe you need to sign in?' unless current_user
|
||||
redirect_to root_path, alert: message
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue