Skip to content

Instantly share code, notes, and snippets.

@taylorbrooks
Created July 13, 2012 21:19
Show Gist options
  • Save taylorbrooks/3107549 to your computer and use it in GitHub Desktop.
Save taylorbrooks/3107549 to your computer and use it in GitHub Desktop.
Error Messages Helper for Bootstrap
# app/helpers/application_helper.rb
def twitterized_type(type)
case type
when :alert
"alert-block"
when :error
"alert-error"
when :notice
"alert-info"
when :success
"alert-success"
else
type.to_s
end
end
@denzuko
Copy link

denzuko commented Jul 31, 2012

Pardon me for the curt and improper english; Twenty hour coding sessions, 64oz of coffee, and an over heating laptop does not make for a very good combination.

Thanks for showing me the HAML code, might help on another app. But, in all actuality, I was using ERB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment