diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index c8edc77f4..8d0567a76 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -52,7 +52,8 @@ class PeopleController < ApplicationController def update # convert date selector into proper timestamp birthday = params[:date] - if birthday + + unless [:month, :day, :year].any?{|x| birthday[x].blank?} params[:person][:profile][:birthday] ||= Date.parse("#{birthday[:year]}-#{birthday[:month]}-#{birthday[:day]}") end diff --git a/app/models/aspect.rb b/app/models/aspect.rb index eb216758c..1fdfd9d5c 100644 --- a/app/models/aspect.rb +++ b/app/models/aspect.rb @@ -29,7 +29,7 @@ class Aspect def to_s name end - + def person_objects person_ids = people.map{|x| x.person_id} Person.all(:id.in => person_ids) diff --git a/app/views/people/edit.html.haml b/app/views/people/edit.html.haml index e39ee4c14..f84e95069 100644 --- a/app/views/people/edit.html.haml +++ b/app/views/people/edit.html.haml @@ -34,7 +34,7 @@ %h4 = t('.your_birthday') %br - = select_date @person.profile.birthday, :order => [:month, :day, :year], :start_year => 1930, :end_year => 2000 + = select_date @person.profile.birthday, :prompt => true, :default => true, :order => [:month, :day, :year], :start_year => 1930, :end_year => 2000 %h4 = t('.your_bio')