Save user id along with new contacts in order to correctly filter them out via CanCan later on.

This commit is contained in:
Roland 2011-06-22 23:48:28 +02:00
parent b1d4e1afeb
commit 8615cb09aa

View file

@ -62,6 +62,9 @@ class ContactsController < ApplicationController
end
}
# add the user id for CanCan
c.user_id = current_user.id
if c.save
flash[:notice] = 'Kontakt hervorragend angelegt!'
redirect_to :action => 'index'