Class: Chop::Form::MultipleCheckbox

Inherits:
Field
  • Object
show all
Defined in:
lib/chop/form.rb

Instance Attribute Summary

Attributes inherited from Field

#field, #label, #path, #session, #value

Instance Method Summary collapse

Methods inherited from Field

candidates, for, from, #get_value

Instance Method Details

#fill_in!Object



98
99
100
101
102
# File 'lib/chop/form.rb', line 98

def fill_in!
  checkboxes.each do |checkbox|
    checkbox.set checkbox_label_in_values?(checkbox)
  end
end

#matches?Boolean

Returns:

  • (Boolean)


94
95
96
# File 'lib/chop/form.rb', line 94

def matches?
  field[:type] == "checkbox" && field[:name].to_s.end_with?("[]")
end