diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index c8edc77f4418436cc3b7acd8af5fe4df5c5185bf..8d0567a76dbba3b03db91047164c3ce9601a00f6 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 eb216758c30993e7ab4543a42a0622c90a0580fb..1fdfd9d5c5d03a0825f5d1bc3ebf2683cd4423cf 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 e39ee4c14e587df1cbd24d8ffda320c91aca61e4..f84e9506931539d5c3c7237d476e38014a22f27b 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')