Module: Bootstrap::ViewHelpers::AlertHelper

Defined in:
app/helpers/bootstrap/view_helpers/alert_helper.rb

Instance Method Summary collapse

Instance Method Details

#bs_alert(title_or_options = nil, options = {}, &block) ⇒ Object



4
5
6
7
8
9
# File 'app/helpers/bootstrap/view_helpers/alert_helper.rb', line 4

def bs_alert(title_or_options = nil, options = {}, &block)
  options = block.present? ? title_or_options : options
  options[:content] = block.present? ? nil : title_or_options

  Components::Alert.new(self, options || {}, &block).to_html
end