Sha256: 986b5ba63e44b1c10a29d9be630855bf569b47a57e4e56e22d84d8b025976a30

Contents?: true

Size: 520 Bytes

Versions: 3

Compression:

Stored size: 520 Bytes

Contents

module MotionPrime
  class StringFieldSection < BaseFieldSection
    element :label, type: :label do
      default_label_options
    end

    element :input, type: :text_field, delegate: proc { table_delegate } do
      options[:input] || {}
    end

    element :error_message, type: :error_message, text: proc { |field| field.all_errors.join("\n") if field.observing_errors? }
    after_element_render :input, :bind_text_input

    def value
      view(:input).text
    end

    def input?
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-0.9.9 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.8 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.7 motion-prime/sections/form/string_field_section.rb