FogBugz #63: Setup für Geburtstagsliste korrigieren.
This commit is contained in:
parent
9f241f979c
commit
274cfd28de
3 changed files with 9 additions and 4 deletions
|
|
@ -6,8 +6,10 @@ class Contact < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :phones, :reject_if => lambda { |a| a[:nr].blank? }, :allow_destroy => true
|
||||
|
||||
def birth_date_string
|
||||
s = birth_day or ""
|
||||
s += birth_month or ""
|
||||
s += birth_year or ""
|
||||
s = birth_day.to_s || ""
|
||||
s += "." unless birth_day.nil?
|
||||
s += birth_month.to_s || ""
|
||||
s += "." unless birth_month.nil?
|
||||
s += birth_year.to_s || ""
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<div class="row">
|
||||
<div class="twelvecol">
|
||||
<div align="center">
|
||||
| <%= link_to 'new', new_contact_path %> · <%= link_to 'birthdays', birthday_index_path %> |
|
||||
| <%= link_to 'new', new_contact_path %>
|
||||
·
|
||||
<%= link_to 'birthdays', birthdays_path %> |
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ ContactORama::Application.routes.draw do
|
|||
|
||||
devise_for :users
|
||||
|
||||
resources :birthdays
|
||||
resources :contacts
|
||||
|
||||
# The priority is based upon order of creation:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue