Sha256: df92ce8714386bcc644326e73fb3742f4e68efd9701e67f60c1f8902a2dc317e

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

module BootstrapForms
  module Helpers
    module FormHelper      
      def bootstrap_form_for(record, options = {}, &block)
        options[:builder] = BootstrapForms::FormBuilder
        form_for(record, options) do |f|
          f.error_messages.html_safe + capture(f, &block).html_safe
        end
      end
    
      def bootstrap_fields_for(record, options = {}, &block)
        options[:builder] = BootstrapForms::FormBuilder
        fields_for(record, nil, options, &block)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap_forms-2.0.1 lib/bootstrap_forms/helpers/form_helper.rb
bootstrap_forms-2.0.0 lib/bootstrap_forms/helpers/form_helper.rb