Sha256: 0a8a17b994c2ae36460085152333bf797667364c029407d6909206f2d98642fb

Contents?: true

Size: 624 Bytes

Versions: 5

Compression:

Stored size: 624 Bytes

Contents

module FormtasticBootstrap
  module Helpers
    module ActionsHelper

      include Formtastic::Helpers::ActionsHelper
      include FormtasticBootstrap::Helpers::FieldsetWrapper

      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

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
formtastic-bootstrap-3.1.1 lib/formtastic-bootstrap/helpers/actions_helper.rb
formtastic-bootstrap-3.1.0 lib/formtastic-bootstrap/helpers/actions_helper.rb
formtastic-bootstrap-3.0.0 lib/formtastic-bootstrap/helpers/actions_helper.rb
formtastic-bootstrap-3.0.0.rc.2 lib/formtastic-bootstrap/helpers/actions_helper.rb
formtastic-bootstrap-3.0.0.rc.1 lib/formtastic-bootstrap/helpers/actions_helper.rb