Sha256: 09b4c43474c2c860bab0d5cb5f94f24f937193ed7163d1b9202830bcc59f44fb

Contents?: true

Size: 415 Bytes

Versions: 11

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module Phlexi
  module Form
    module Structure
      class NamespaceCollection < Phlexi::Field::Structure::NamespaceCollection
        def extract_input(params)
          namespace = build_namespace(0)
          @block.call(namespace)

          inputs = params[key].map { |param| namespace.extract_input([param]) }
          {key => inputs}
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
phlexi-form-0.5.1 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.5.0 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.8 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.7 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.6 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.5 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.4 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.3 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.2 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.1 lib/phlexi/form/structure/namespace_collection.rb
phlexi-form-0.4.0 lib/phlexi/form/structure/namespace_collection.rb