Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created July 3, 2012 07:15
Show Gist options
  • Save jugyo/3038225 to your computer and use it in GitHub Desktop.
Save jugyo/3038225 to your computer and use it in GitHub Desktop.
TwitterBootstrapHelper
module TwitterBootstrapHelper
# Usage:
#
# icon(:'exclamation-sign')
#
def icon(name)
content_tag :i, '', :class => "icon-#{name}"
end
# Usage:
#
# = alert_message(:error) do
# ERROR!!
#
def alert_message(type, options = {}, &block)
content_tag :div, capture(&block),
:class => "alert alert-#{type}",
:'data-alert' => 'alert'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment