module FormtasticRebootstrap::Helpers::ActionsHelper

Public Instance Methods

actions(*args, &block) click to toggle source
# File lib/formtastic_rebootstrap/helpers/actions_helper.rb, line 8
def actions(*args, &block)

  html_options = args.extract_options!
  html_options[:class] ||= "form-actions"

  if block_given?
    field_set_and_list_wrapping(html_options, &block)
  else
    args = default_actions if args.empty?
    contents = args.map { |action_name| action(action_name) }
    field_set_and_list_wrapping(html_options, contents)
  end
end