Fix Rails 4.1 migration issues
This commit is contained in:
@@ -31,7 +31,7 @@ module PostSetPresenters
|
||||
end
|
||||
|
||||
def pattern_tags
|
||||
Tag.name_matches(post_set.tag_string).all(:select => "name", :limit => Danbooru.config.tag_query_limit, :order => "post_count DESC").map(&:name)
|
||||
Tag.name_matches(post_set.tag_string).select("name").limit(Danbooru.config.tag_query_limit).order("post_count DESC").map(&:name)
|
||||
end
|
||||
|
||||
def related_tags_for_group
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user