Merge branch 'master' of /Users/r/Dropbox/git-repo/contactorama

This commit is contained in:
Roland Jesse 2011-12-18 22:29:23 +01:00
commit b0edffd36c

View file

@ -86,6 +86,11 @@ class ContactsController < ApplicationController
def update
c = Contact.find(params[:id])
c.update_attributes(params[:contact])
# birthdate comes w/ day + month separated from year
c.birth_month = params[:birth_month].to_i if c.birth_month != params[:birth_month]
c.birth_day = params[:birth_day].to_i if c.birth_day != params[:birth_day]
if c.save!
flash[:notice] = 'Kontakt aktualisiert.'
redirect_to :action => :index