Grammar fix in error message for blocked login (in "application_controller.rb")
This commit is contained in:
parent
45f9cca9b3
commit
6b4602a733
|
@ -32,7 +32,7 @@ class ApplicationController < ActionController::Base
|
||||||
def reject_blocked!
|
def reject_blocked!
|
||||||
if current_user && current_user.blocked?
|
if current_user && current_user.blocked?
|
||||||
sign_out current_user
|
sign_out current_user
|
||||||
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
|
flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it."
|
||||||
redirect_to new_user_session_path
|
redirect_to new_user_session_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -40,7 +40,7 @@ class ApplicationController < ActionController::Base
|
||||||
def after_sign_in_path_for resource
|
def after_sign_in_path_for resource
|
||||||
if resource.is_a?(User) && resource.respond_to?(:blocked?) && resource.blocked?
|
if resource.is_a?(User) && resource.respond_to?(:blocked?) && resource.blocked?
|
||||||
sign_out resource
|
sign_out resource
|
||||||
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
|
flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it."
|
||||||
new_user_session_path
|
new_user_session_path
|
||||||
else
|
else
|
||||||
super
|
super
|
||||||
|
|
Loading…
Reference in New Issue