Sha256: 0ff65f6d47c5135a6dec6dc134f9bb9b6870f833338234637614b5427a9037cd

Contents?: true

Size: 622 Bytes

Versions: 16

Compression:

Stored size: 622 Bytes

Contents

module Formstrap
  module FormHelper
    def formstrap_form_for(record, options = {}, &block)
      # ToDo: Can we pass info about the view here (e.g. host, protocol ...)
      options = options.reverse_merge({builder: Formstrap::FormBuilder})
      form_for(record, options, &block)
    end

    def formstrap_form_with(options = {}, &block)
      # ToDo: Can we pass info about the view here (e.g. host, protocol ...)
      options = options.reverse_merge({builder: Formstrap::FormBuilder})
      form_with(**options, &block)
    end
  end
end

ActiveSupport.on_load(:action_view) do
  include Formstrap::FormHelper
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
formstrap-0.4.5 lib/formstrap/form_helper.rb
formstrap-0.4.4 lib/formstrap/form_helper.rb
formstrap-0.4.3 lib/formstrap/form_helper.rb
formstrap-0.4.2 lib/formstrap/form_helper.rb
formstrap-0.3.5 lib/formstrap/form_helper.rb
formstrap-0.3.4 lib/formstrap/form_helper.rb
formstrap-0.3.3 lib/formstrap/form_helper.rb
formstrap-0.3.2 lib/formstrap/form_helper.rb
formstrap-0.3.1 lib/formstrap/form_helper.rb
formstrap-0.3.0 lib/formstrap/form_helper.rb
formstrap-0.2.1 lib/formstrap/form_helper.rb
formstrap-0.2.0 lib/formstrap/form_helper.rb
formstrap-0.1.3 lib/formstrap/form_helper.rb
formstrap-0.1.2 lib/formstrap/form_helper.rb
formstrap-0.1.1 lib/formstrap/form_helper.rb
formstrap-0.1.0 lib/formstrap/form_helper.rb