diff --git a/app/models/user.rb b/app/models/user.rb index f8641f2..e11c867 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,5 +1,5 @@ class User < ActiveRecord::Base - attr_accessible :email, :password, :user_id, :admin, :password_confirmation, :first_name, :last_name + attr_accessible :email, :password, :admin, :password_confirmation, :first_name, :last_name validates_confirmation_of :password, :password_confirmation, :on => :create validates :password, :presence => true, :confirmation => true, diff --git a/db/schema.rb b/db/schema.rb index d2e48e4..fc50ac6 100755 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130527165832) do +ActiveRecord::Schema.define(:version => 20130531143853) do create_table "paid_time_offs", :force => true do |t| t.integer "user_id" @@ -54,4 +54,15 @@ ActiveRecord::Schema.define(:version => 20130527165832) do t.datetime "updated_at", :null => false end + create_table "work_infos", :force => true do |t| + t.integer "user_id" + t.string "income" + t.string "bonuses" + t.integer "years_worked" + t.string "SSN" + t.date "DoB" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + end diff --git a/db/seeds.rb b/db/seeds.rb index c62ce93..c568203 100755 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -146,7 +146,9 @@ paid_time_off = [ users.each do |user_info| - User.create!(user_info) + user = User.new(user_info.reject {|k| k == :user_id}) + user.user_id = user_info[:user_id] + user.save end retirements.each do |r|