SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Thursday, June 19, 2008

radio_button in rails 2.1.0

<%=f.radio_button :Sex,@Sex[0]%>Male
<%=f.radio_button :Sex,@Sex[1]%>Female
In application.rb
def setup
@Sex = ['M', 'F']
end