Sha256: 5bed3b909fdbf7a16571ce8770432ebab435d0a45fd22b093a0f06611de0e344

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

module HungryForm
  module Elements
    class RadioGroup < Base::OptionsElement
      # Sets a value of the element
      # Checks the value from the resolver params against the available options
      def set_value
        if resolver.params.key?(name)
          if options.keys.include?(resolver.params[name])
            self.value = resolver.params[name]
          end
        else
          self.value = @attributes[:value]
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hungryform-0.0.4 lib/hungryform/elements/radio_group.rb