Merge pull request #38 from coopdevs/date_of_birth_in_form

date_of_birth in views new and edit
This commit is contained in:
Saverio Trioni
2014-07-10 11:58:25 +02:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -17,6 +17,7 @@
= f.input :phone
= f.input :alt_phone
= f.input :date_of_birth, start_year: Date.today.year - 90, end_year: Date.today.year - 12, include_blank: :true
= f.input :description, as: 'text'
+1 -1
View File
@@ -36,7 +36,7 @@
%dl.dl-horizontal
- if @user.date_of_birth.present?
- if @user.date_of_birth.present? && admin?
%dt= User.human_attribute_name(:date_of_birth)
%dd= l @user.date_of_birth
- phones = [@user.phone, @user.alt_phone].map(&:presence).compact