lib/para/i18n/form_builder/nested_form.rb
# Traverses the parent_builder chain until the top of the builder chain returning
# the top-most form builder which represents the one created through the
# `form_for` like helper.
#
# Note that this could go into the Para::FormBuilder::NestedForm module, but it's
# not used inside Para, so we keep it here for now.
#
Traverses the parent_builder chain until the top of the builder chain returning
the top-most form builder which represents the one created through the
`form_for` like helper.

Note that this could go into the Para::FormBuilder::NestedForm module, but it's
not used inside Para, so we keep it here for now.
Traverses the parent_builder chain until the top of the builder chain returning the top - most form builder which represents the one created through the ` form_for ` like helper . Note that this could go into the Para :: FormBuilder :: NestedForm module but it ' s not used inside Para so we keep it here for now .
def top_level_form_builder
          parent_builder = options[:parent_builder]
          while parent_builder && parent_builder.options[:parent_builder]
            parent_builder = parent_builder.options[:parent_builder]
          end
          parent_builder || self
        end
def top_level_form_builder parent_builder = options [ :parent_builder ] while parent_builder && parent_builder . options [ :parent_builder ] parent_builder = parent_builder . options [ :parent_builder ] end parent_builder || self end
Traverses the parent_builder chain until the top of the builder chain returning
the top-most form builder which represents the one created through the
`form_for` like helper.
Traverses the parent_builder chain until the top of the builder chain returning the top - most form builder which represents the one created through the ` form_for ` like helper .