| Class | FormTestHelper::RadioButtonGroup |
| In: |
lib/form_test_helper.rb
|
| Parent: | Field |
# File lib/form_test_helper.rb, line 330
330: def initial_value
331: checked_tags = tags.select {|tag| tag['checked'] }
332: # If multiple radio buttons are checked, Firefox uses the last one
333: # If none, the value is undefined and is not submitted
334: checked_tags.any? ? checked_tags.last['value'] : nil
335: end
# File lib/form_test_helper.rb, line 337
337: def options
338: tags.collect {|tag| tag['value'] }
339: end