Sha256: 57c6b32d8841ba24cfbc8eb04caf92e1dfdadd101bc6520284b4186a9a263d9d

Contents?: true

Size: 578 Bytes

Versions: 2

Compression:

Stored size: 578 Bytes

Contents

require 'railsstrap/core_ext/rails/form/base_helper'

module Railsstrap
  module Form
    module SubmitHelper
      include BaseHelper

      def submit(value=nil, options={})
        context = options.delete(:context) || 'primary'
        append_class! options, "btn btn-#{context}"
        if horizontal_form?
          content_tag :div, class: 'form-group' do
            content_tag :div, class: 'col-sm-offset-3 col-sm-9' do
              super value, options
            end
          end
        else
          super value, options
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
railsstrap-4.0.0.beta3 lib/railsstrap/core_ext/rails/form/submit_helper.rb
railsstrap-4.0.0.beta2 lib/railsstrap/core_ext/rails/form/submit_helper.rb