Sha256: b54b6a75fdb296cb901dd05e8943d59cc8c475890c42628d3bdd8c59bb3f7351

Contents?: true

Size: 1011 Bytes

Versions: 49

Compression:

Stored size: 1011 Bytes

Contents

require 'simple_form/form_builder'

require 'para/form_builder/attributes_mappings_tracker'
require 'para/form_builder/containers'
require 'para/form_builder/field_mappings'
require 'para/form_builder/nested_form'
require 'para/form_builder/ordering'
require 'para/form_builder/settings'
require 'para/form_builder/tabs'

# We'll implement our own form builder later, but for now it would need to
# patch or override Cocoon to allow creating nested fields with our custom
# form builder instead of `simple_fields_for` which uses SimpleForm::FormBuilder
# explicitly
#
SimpleForm::FormBuilder.class_eval do
  prepend Para::FormBuilder::AttributesMappingsTracker

  include Para::FormBuilder::Containers
  include Para::FormBuilder::FieldMappings
  include Para::FormBuilder::NestedForm
  include Para::FormBuilder::Ordering
  include Para::FormBuilder::Settings
  include Para::FormBuilder::Tabs
end

# Map IP Address fields to string
SimpleForm::FormBuilder.map_type(:inet, to: SimpleForm::Inputs::StringInput)

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/form_builder.rb
para-0.12.3 lib/para/form_builder.rb
para-0.12.2 lib/para/form_builder.rb
para-0.12.1 lib/para/form_builder.rb
para-0.12.0 lib/para/form_builder.rb
para-0.11.4 lib/para/form_builder.rb
para-0.11.3 lib/para/form_builder.rb
para-0.11.2 lib/para/form_builder.rb
para-0.11.1 lib/para/form_builder.rb
para-0.11.0 lib/para/form_builder.rb
para-0.10.0 lib/para/form_builder.rb
para-0.9.4 lib/para/form_builder.rb
para-0.9.3.3 lib/para/form_builder.rb
para-0.9.3.2 lib/para/form_builder.rb
para-0.9.3.1 lib/para/form_builder.rb
para-0.9.2 lib/para/form_builder.rb
para-0.9.0 lib/para/form_builder.rb
para-0.8.15 lib/para/form_builder.rb
para-0.8.14 lib/para/form_builder.rb
para-0.8.13 lib/para/form_builder.rb