Add thirs status - verification failed

This commit is contained in:
Alex Sherman 2020-06-12 15:37:53 +05:00
parent f8eea08357
commit 56ac816dd1
13 changed files with 96 additions and 40 deletions

View file

@ -108,4 +108,14 @@ module ApplicationHelper
def body_css_class
[controller_path.split('/').map!(&:dasherize), action_name.dasherize, 'page'].join('-')
end
def verified_email_span(verification)
content_tag(:span, verification.email, class: verified_email_class(verification))
end
def verified_email_class(verification)
return 'text-danger' if verification.failed?
return 'text-primary' if verification.not_verified?
return 'text-success' if verification.verified?
end
end