Closed misaka closed 7 years ago
@aliuk2012 Just to check, this PR has both changes in it, the addition of value_method
and text_method
to radio_buttons_fieldset
AND the addition of a new method collection_radio_buttons
. Are you approving the addition of both of these?
Could you strip out the collection_radio_button
method and move that into its own branch? If we log an issue and reference that branch we can then look at adding that method as part of another feature.
Commit removed, merging.
NOTE: There are two changes here, one changes the existing
radio_buttons_fieldset
and the other adds acollection_radio_buttons
method. See the discussion happening in issue #82, my proposal is that we just make the change toradio_buttons_fieldset
for now and dropcollection_radio_buttons
until we can do it properly.When generating a radio-button fieldset, there are times when we want to specify how to get the form value or label text for the choices passed in, the same way
collection_radio_buttons
does in Rails. For example, when assigning a team to a person we may want to use the team's DB ID as the value and the team's name as the radio button text. This change adds these options toradio_button_fieldset
(adding them to other places, such ascheck_box_fieldset
, is an exercise for later).This addresses issue #82.