I'm creating my first Rails app and need an idea creating forms.
I have Meeting model with place attribute.
I want to have two fields for Meeting.place = one would be select with
places from other meetings or text_field if the place is being used
first time. User would be selecting radio_button of which field he has
used.
So is there any way to nest select and text_field within 2
radio_buttons?
I would appreciate any other solution ideas too.
Cheers
In the controller, I test for the presence of the practice_name attribute, and if it's there, create a new Practice before assigning the practice to the User.
if( params[:practice_name] )
practice = Practice.create({:name => params['practice_name']})
params[:user][:practice_id] = practice.id
end
# regular save/update here
This gets you a "combo-box", where you can choose, or add new, in one interface "slot".