mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Apply single quote convention in Ruby code
This commit is contained in:
@@ -10,13 +10,13 @@ module Admin
|
||||
|
||||
def authenticate_admin
|
||||
unless user_signed_in?
|
||||
flash[:alert] = "You must be logged in to access this page."
|
||||
flash[:alert] = 'You must be logged in to access this page.'
|
||||
redirect_to new_user_session_path
|
||||
return
|
||||
end
|
||||
|
||||
unless current_user.moderator? || current_user.admin?
|
||||
flash[:alert] = "You do not have the privilegies to access this page."
|
||||
flash[:alert] = 'You do not have the privilegies to access this page.'
|
||||
redirect_to root_path
|
||||
return
|
||||
end
|
||||
|
||||
@@ -33,13 +33,13 @@ module Admin
|
||||
|
||||
def authenticate_admin
|
||||
unless user_signed_in?
|
||||
flash[:alert] = "You must be logged in to access this page."
|
||||
flash[:alert] = 'You must be logged in to access this page.'
|
||||
redirect_to new_user_session_path
|
||||
return
|
||||
end
|
||||
|
||||
unless current_user.admin?
|
||||
flash[:alert] = "You do not have the privilegies to access this page."
|
||||
flash[:alert] = 'You do not have the privilegies to access this page.'
|
||||
redirect_to root_path
|
||||
return
|
||||
end
|
||||
@@ -51,7 +51,7 @@ module Admin
|
||||
user.skip_confirmation! # automatically confirm user email
|
||||
|
||||
if user.save
|
||||
flash[:notice] = translate_with_resource("create.success")
|
||||
flash[:notice] = translate_with_resource('create.success')
|
||||
redirect_to admin_user_path(user)
|
||||
else
|
||||
render :new, locals: {
|
||||
@@ -73,7 +73,7 @@ module Admin
|
||||
user.skip_reconfirmation! # automatically reconfirm user email
|
||||
|
||||
if user.save
|
||||
flash[:notice] = translate_with_resource("update.success")
|
||||
flash[:notice] = translate_with_resource('update.success')
|
||||
redirect_to admin_user_path(user)
|
||||
else
|
||||
render :new, locals: {
|
||||
|
||||
Reference in New Issue
Block a user