Post#give_favorites_to_parent: fix exception (fixup 77793759)

Forgot the `belong_to :user` association in 77793759.
This commit is contained in:
evazion
2017-04-04 20:18:32 -05:00
parent 38800fc50e
commit 40feeb2411

View File

@@ -1,5 +1,6 @@
class Favorite < ActiveRecord::Base
belongs_to :post
belongs_to :user
scope :for_user, lambda {|user_id| where("user_id % 100 = #{user_id.to_i % 100} and user_id = #{user_id.to_i}")}
attr_accessible :user_id, :post_id