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

for

Instance Method Details

#fill_in!Object



55
56
57
# File 'lib/chop/form.rb', line 55

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

#matches?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/chop/form.rb', line 51

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