Commit c177593e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #2059 from dolanor/feature-rewording-blocked-users

Rewording for the account being blocked
parents 10ec9b22 70ef433e
...@@ -35,7 +35,7 @@ class ApplicationController < ActionController::Base ...@@ -35,7 +35,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 was blocked" flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
redirect_to new_user_session_path redirect_to new_user_session_path
end end
end end
...@@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base ...@@ -43,7 +43,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 was blocked" flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
new_user_session_path new_user_session_path
else else
super super
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment