Sha256: a45e75246d91ba0502929adc6d5147a22452928dfa8b7039f1e4c1605cc6a5c3

Contents?: true

Size: 297 Bytes

Versions: 1

Compression:

Stored size: 297 Bytes

Contents

module HungryForm
  module Elements
    class CheckboxField < Base::ActiveElement
      def set_value
        super

        if resolver.params.key?(name)
          self.attributes[:checked] = 'checked'
        else
          self.attributes[:checked] = ''
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hungryform-0.0.7 lib/hungryform/elements/checkbox_field.rb