Sha256: c29a6de20ef6c45d63201742fc802c861ff283d6708e06e919d76022bffe1b0f

Contents?: true

Size: 826 Bytes

Versions: 11

Compression:

Stored size: 826 Bytes

Contents

begin
  require 'nested_form/builder_mixin'

  module BootstrapForm
    class NestedFormBuilder < ::BootstrapForm::FormBuilder
      include ::NestedForm::BuilderMixin
    end
  end

  module BootstrapForm
    module Helpers
      module NestedForm
        def bootstrap_nested_form_for(object, options = {}, &block)
          options.reverse_merge!({builder: BootstrapForm::NestedFormBuilder})
          bootstrap_form_for(object, options) do |f|
            capture(f, &block).to_s << after_nested_form_callbacks
          end
        end
      end
    end
  end

rescue LoadError
  module BootstrapForm
    module Helpers
      module NestedForm
        def bootstrap_nested_form_for(object, options = {}, &block)
          raise 'nested_forms was not found. Is it in your Gemfile?'
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
comfy_bootstrap_form-4.0.0.beta1 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.7.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.6.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.5.3 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.5.2 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.5.1 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.5.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.4.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.3.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.2.0 lib/bootstrap_form/helpers/nested_form.rb
bootstrap_form-2.1.1 lib/bootstrap_form/helpers/nested_form.rb