Skip to content
Extraits de code Groupes Projets
Valider 8023b6f3 rédigé par Raphael's avatar Raphael
Parcourir les fichiers

Check for birthday before putting in birthday paramaters

parent 58c3a430
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -51,10 +51,11 @@ class PeopleController < ApplicationController
def update
# convert date selector into proper timestamp
birthday = params[:date]
unless [:month, :day, :year].any?{|x| birthday[x].blank?}
params[:person][:profile][:birthday] ||= Date.parse("#{birthday[:year]}-#{birthday[:month]}-#{birthday[:day]}")
if birthday = params[:date]
unless [:month, :day, :year].any?{|x| birthday[x].blank?}
params[:person][:profile][:birthday] ||= Date.parse("#{birthday[:year]}-#{birthday[:month]}-#{birthday[:day]}")
end
end
# upload and set new profile photo
......
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