Browse files

gender is a text field

  • Loading branch information...
1 parent 1bba4c6 commit a23076387907e32215267e85c148441ff9ffc214 @sarahmei sarahmei committed Nov 5, 2010
@@ -29,7 +29,7 @@
= t('.your_gender')
- = select_tag 'person[profile][gender]', options_for_select(["","Female","Male"], @person.profile.gender)
+ = profile.text_field :gender, :value => @profile.gender, :placeholder => t('.fill_me_out')
rafpaf Nov 6, 2010

This makes me happy.

danbri Nov 30, 2010

This is the right thing to do imho, ...but also having 2 'well known' values, with a fixed symbolic spelling in English or whatever other language, will make it easier to build cross-language UI over the top, as well as search/browse functionality. Even if gender is fuzzy, people are interested in using information about it, and having some 'well known' values there will help, without making those values a closed list.

= t('.your_birthday')
@@ -20,7 +20,7 @@
Your gender
- = select_tag 'person[profile][gender]', options_for_select(["","Female","Male"], @person.profile.gender)
+ = profile.text_field :gender, :value => @profile.gender, :placeholder => t(".fill_me_out")
Your birthday
@@ -156,6 +156,7 @@ en:
you_dont_have_any_photos: "You don't have any photos! Go to the"
page_to_upload_some: "page to upload some."
+ fill_me_out: "Fill me out"
edit_profile: "Edit your profile"
define_aspects: "Define your aspects"
connect_services: "Connect your services"
@@ -0,0 +1,13 @@
+Feature: editing your profile
+ Scenario: editing gender with a textbox
+ Given I am signed in
+ And I click on my name in the header
+ And I follow "edit profile"
+ Then I should be on my edit profile page
+ When I fill in "person_profile_gender" with "F"
+ And I press "Update Profile"
+ Then I should be on my edit profile page
+ And I should see "Profile updated"
+ And the "person_profile_gender" field should contain "F"
@@ -14,6 +14,7 @@ Feature: new user registration
Scenario: new user goes through the setup wizard
When I fill in "person_profile_first_name" with "O"
And I fill in "person_profile_last_name" with "Hai"
+ And I fill in "person_profile_gender" with "guess!"
And I press "Save and continue"
Then I should see "Profile updated"
And I should see "Your aspects"
@@ -7,6 +7,8 @@ def path_to(page_name)
send("#{$1.gsub(/\W+/, '_')}_path", @it)
when /^the ([\w ]+) page$/
send("#{$1.gsub(/\W+/, '_')}_path")
+ when /^my edit profile page$/
+ edit_person_path(@me.person)
when /^"(\/.*)"/

0 comments on commit a230763

Please sign in to comment.