Sha256: f6f918a7dadeeeeea204fb2bf358433b321c67387e55c2e05cfedcb88d03fa88

Contents?: true

Size: 788 Bytes

Versions: 7

Compression:

Stored size: 788 Bytes

Contents

begin
  require 'nested_form/builder_mixin'

  module NestedForm
    class TwitterBootstrapBuilder < ::BootstrapForms::FormBuilder
      include ::NestedForm::BuilderMixin
    end
  end

  module BootstrapForms
    module Helpers
      module NestedFormHelper
        def bootstrap_nested_form_for(*args, &block)
          options = args.extract_options!.reverse_merge(:builder => NestedForm::TwitterBootstrapBuilder)
          form_for(*(args << options), &block) << after_nested_form_callbacks
        end
      end
    end
  end
rescue LoadError => e
  module BootstrapForms
    module Helpers
      module NestedFormHelper
        def bootstrap_nested_form_for(*args, &block)
          raise 'nested_form was not found. Is it in your Gemfile?'
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bootstrap_forms-4.0.1 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-4.0.0 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-3.0.1 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-3.0.0 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-3.0.0.rc1 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-2.1.1 lib/bootstrap_forms/helpers/nested_form_helper.rb
bootstrap_forms-2.0.8 lib/bootstrap_forms/helpers/nested_form_helper.rb