Skip to content

Instantly share code, notes, and snippets.

@pbruna
Created May 15, 2012 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbruna/2705106 to your computer and use it in GitHub Desktop.
Save pbruna/2705106 to your computer and use it in GitHub Desktop.
content_tag block in Rails 3
def formated_error_message(message)
messages = message.split(/\n/)
content_tag :ul do
messages.reduce('') {|c,msg| c << content_tag(:li, msg)}.html_safe
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment