Module: Protected::PasswordsHelper
- Defined in:
- app/helpers/protected/passwords_helper.rb
Constant Summary collapse
- MESSAGES =
{'match confirmation' => "Passwords should match confirmation", '8 characters long' => "Password should be at least 8 characters long", 'special character' => "Password should have at least 1 digit, 1 capital letter and 1 special character \(\!\@\#\$\%\^\&\*\(\)\_\-\=\+\)", 'previous five passwords' => "You can not use previous five passwords", 'password token' => "You must have a valid reset password token" }
Instance Method Summary collapse
Instance Method Details
#message_class(messages, error) ⇒ Object
17 18 19 |
# File 'app/helpers/protected/passwords_helper.rb', line 17 def (, error) .include?(error) ? "block-message error" : "" end |
#password_instructions(messages) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/helpers/protected/passwords_helper.rb', line 9 def password_instructions() section = "" MESSAGES.each do |error, | section << "<div class=\"alert-message #{ (, error) }\">#{}</div>" end section.html_safe end |