| Class | FormTestHelper::RadioButtonGroup |
| In: |
lib/form_test_helper.rb
|
| Parent: | Field |
# File lib/form_test_helper.rb, line 291
291: def initial_value
292: checked_tags = tags.select {|tag| tag['checked'] }
293: # If multiple radio buttons are checked, Firefox uses the last one
294: # If none, the value is undefined and is not submitted
295: checked_tags.any? ? checked_tags.last['value'] : nil
296: end
# File lib/form_test_helper.rb, line 298
298: def options
299: tags.collect {|tag| tag['value'] }
300: end