diff --git a/app/models/relationship.rb b/app/models/relationship.rb index 95412df..d024bb7 100644 --- a/app/models/relationship.rb +++ b/app/models/relationship.rb @@ -13,8 +13,8 @@ class Relationship < ActiveRecord::Base attr_accessible :followed_id - belongs_to :follower, :foreign_key => "follower_id", :class_name => "User" - belongs_to :followed, :foreign_key => "followed_id", :class_name => "User" + belongs_to :follower, :class_name => "User" + belongs_to :followed, :class_name => "User" validates :follower_id, :presence => true validates :followed_id, :presence => true diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 698c0d1..c212d61 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -38,7 +38,7 @@ ActiveSupport::Dependencies.clear def test_sign_in(user) - controller.current_user = user + controller.sign_in(user) end end end