diff --git a/app/views/profile_editor/_person.rhtml b/app/views/profile_editor/_person.rhtml index 0f29d56..8d26681 100644 --- a/app/views/profile_editor/_person.rhtml +++ b/app/views/profile_editor/_person.rhtml @@ -2,7 +2,7 @@ <%= f.text_field(:contact_information) %> <%= f.text_field(:contact_phone) %> <%# use :size => 3 if you want 3 radios by line %> - <%= f.radio_group :profile, :sex, [ ['male',_('Male')], ['female',_('Female')] ] %> + <%= f.radio_group :profile_data, :sex, [ ['male',_('Male')], ['female',_('Female')] ] %> <%= f.text_field(:birth_date) %> <%= f.text_field(:address) %> <%= f.text_field(:city) %> diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index f914b3c..917926f 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -59,8 +59,13 @@ class ProfileEditorControllerTest < Test::Unit::TestCase should 'saving profile info' do person = create_user('test_profile').person - post :edit, :profile => 'test_profile', :profile_data => { 'name' => 'new person', 'contact_information' => 'new contact information', 'address' => 'new address' } + post :edit, :profile => 'test_profile', :profile_data => { 'name' => 'new person', 'contact_information' => 'new contact information', 'address' => 'new address', 'sex' => 'female' } assert_redirected_to :action => 'index' + person.reload + assert_equal 'new person', person.name + assert_equal 'new contact information', person.contact_information + assert_equal 'new address', person.address + assert_equal 'female', person.sex end should 'not permmit if not logged' do -- libgit2 0.21.2