Fix Rails 4.1 migration issues

This commit is contained in:
r888888888
2014-04-24 16:15:59 -07:00
parent 616aef4394
commit a89c57cee0
7 changed files with 22 additions and 9 deletions

View File

@@ -75,7 +75,7 @@ class UserPresenter
def favorites
@favorites ||= begin
arel = user.favorites.limit(6).includes(:post).reorder("favorites.id desc")
arel = user.favorites.limit(6).joins(:post).reorder("favorites.id desc")
if CurrentUser.user.hide_deleted_posts?
arel = arel.where("posts.is_deleted = false")