Module: DeviseHelper
- Defined in:
- app/helpers/devise_helper.rb
Instance Method Summary collapse
Instance Method Details
#devise_error_messages! ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/devise_helper.rb', line 2 def return "" if resource.errors.empty? = resource.errors..map { |msg| content_tag(:li, msg) }.join sentence = "#{pluralize(resource.errors.count, "error")} prohibited this #{resource_name} from being saved:" html = <<-HTML <div id="error_explanation"> <h2>#{sentence}</h2> <ul>#{}</ul> </div> HTML html.html_safe end |