Skip to content
Extraits de code Groupes Projets
Valider 4a39d1a5 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

date now has a default nil value

parent e4f8f558
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
......@@ -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)
......
......@@ -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')
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter