Fogbugz #41: CanCan, damit Contacts auch zu Usern gehoeren.

This commit is contained in:
Roland 2011-06-07 21:28:02 +02:00
parent 673ade667a
commit 472c6809bd
4 changed files with 41 additions and 2 deletions

View file

@ -0,0 +1,9 @@
class AddOwningUserToContacts < ActiveRecord::Migration
def self.up
add_column :contacts, :user_id, :integer
end
def self.down
remove_column :contacts, :user_id
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110601205228) do
ActiveRecord::Schema.define(:version => 20110607192020) do
create_table "contacts", :force => true do |t|
t.string "firstname"
@ -25,6 +25,7 @@ ActiveRecord::Schema.define(:version => 20110601205228) do
t.integer "birth_day"
t.integer "birth_month"
t.integer "birth_year"
t.integer "user_id"
end
create_table "emails", :force => true do |t|