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