# Edit radio button values

**URL:** <https://www.ruby-forum.com/t/edit-radio-button-values/143607>\
**Category:** Rails\
**Created:** [July 21, 2008, 5:45am UTC](https://www.ruby-forum.com/t/edit-radio-button-values/143607 "2008-07-21T05:45:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaiganez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Post date:** [July 21, 2008, 5:45am UTC](https://www.ruby-forum.com/t/edit-radio-button-values/143607/1 "2008-07-21T05:45:20Z")

</div>

my problem is… during edit process radio button should be checked as  
default …how can i do that …pl help…

my edit .erb file

\<% form\_tag (:action =\> ‘update’, :id =\> @mobile )do%\>

Title: \<%= radio\_button 'mobile', 'brand', 'yes' :checked =\> checked?( 'mobile', 'brand', 'yes' )%\>\<%= radio\_button 'mobile', 'brand', no' :checked =\> checked?( 'mobile', 'brand', 'no' )%\>

\<%= submit\_tag “Save changes” %\>  
\<%end %\>
