Class: Chop::Form::Select

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



88
89
90
# File 'lib/chop/form.rb', line 88

def fill_in!
  session.select value, from: label
end

#matches?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/chop/form.rb', line 84

def matches?
  field.tag_name == "select" && !field[:multiple]
end