class Chop::Form::Checkbox

Public Instance Methods

fill_in!() click to toggle source
# File lib/chop/form.rb, line 138
def fill_in!
  field.set value.present?
end
get_value() click to toggle source
# File lib/chop/form.rb, line 142
def get_value
  field.checked? ? "✓" : ""
end
matches?() click to toggle source
# File lib/chop/form.rb, line 134
def matches?
  field[:type] == "checkbox" && !field[:name].to_s.end_with?("[]")
end