Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged pull request #98 from nhocki/master.

Use html_safe for error_messages_for helper. Let's you use HTML in your translations.
  • Loading branch information...
commit 2363790ddf6f1f7bce3b689d59a6bc65d7e7f601 2 parents 581e389 + 172badd
@ryanb authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/generators/nifty/layout/templates/error_messages_helper.rb
View
4 lib/generators/nifty/layout/templates/error_messages_helper.rb
@@ -7,8 +7,8 @@ def error_messages_for(*objects)
messages = objects.compact.map { |o| o.errors.full_messages }.flatten
unless messages.empty?
content_tag(:div, :class => "error_messages") do
- list_items = messages.map { |msg| content_tag(:li, msg) }
- content_tag(:h2, options[:header_message]) + content_tag(:p, options[:message]) + content_tag(:ul, list_items.join.html_safe)
+ list_items = messages.map { |msg| content_tag(:li, msg.html_safe) }
+ content_tag(:h2, options[:header_message].html_safe) + content_tag(:p, options[:message].html_safe) + content_tag(:ul, list_items.join.html_safe)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.