class Bootstrap::ViewHelpers::Components::Modal::Footer

Public Instance Methods

close_button(label, close_options = {}) click to toggle source
# File lib/bootstrap/view_helpers/components/modal/footer.rb, line 10
def close_button(label, close_options = {})
  close_options = close_button_default_options.merge(close_options)
  close_options[:label] = label
  Button.new(view, close_options).to_html
end
to_html() click to toggle source
# File lib/bootstrap/view_helpers/components/modal/footer.rb, line 6
def to_html
  content_tag(:div, options) { block.call(self) if block.present? }
end

Protected Instance Methods

close_button_default_options() click to toggle source
# File lib/bootstrap/view_helpers/components/modal/footer.rb, line 18
def close_button_default_options
  { data: { dismiss: 'modal' }, style: :secondary, type: :button }
end
inject_class_name_to_options() click to toggle source
# File lib/bootstrap/view_helpers/components/modal/footer.rb, line 22
def inject_class_name_to_options
  options[:class] = "modal-footer #{options[:class]}"
  options[:class].strip!
end
parse_options(options) click to toggle source
# File lib/bootstrap/view_helpers/components/modal/footer.rb, line 27
def parse_options(options)
  super
  inject_class_name_to_options
end