Module: Toolsmith::ViewHelpers::BootstrapHelpers

Included in:
Toolsmith::ViewHelpers
Defined in:
lib/toolsmith/helpers/bootstrap_helpers.rb

Constant Summary collapse

FLASH_LEVELS =
[:success, :error, :notice, :alert]

Instance Method Summary collapse

Instance Method Details

#flash_div(level) ⇒ Object



14
15
16
# File 'lib/toolsmith/helpers/bootstrap_helpers.rb', line 14

def flash_div(level)
  Toolsmith::Views::FlashDiv.new(self, level)
end

#flash_divsObject



10
11
12
# File 'lib/toolsmith/helpers/bootstrap_helpers.rb', line 10

def flash_divs
  FLASH_LEVELS.map { |l| flash_div(l).to_s }.join.html_safe
end

#form_actions(&block) ⇒ Object



6
7
8
# File 'lib/toolsmith/helpers/bootstrap_helpers.rb', line 6

def form_actions(&block)
  (:div, class: "form-actions", &block)
end