/notes: default to listing notes, not posts. Remove group_by=post.

The posts listing is replaced by a link to order:note.
This commit is contained in:
evazion
2017-04-23 14:26:23 -05:00
parent 76eefd0ffe
commit e6d1842545
6 changed files with 8 additions and 61 deletions

View File

@@ -1,17 +0,0 @@
module PostSets
class Note < PostSets::Post
attr_reader :params
def initialize(params)
# don't call super because we don't want to repeat these queries
@params = params
@tag_array = Tag.scan_query(params[:tags])
@page = params[:page] || 1
@posts = ::Post.tag_match(tag_string).has_notes.paginate(page, :limit => limit).reorder("last_noted_at desc")
end
def limit
[(params[:limit] || CurrentUser.user.per_page).to_i, 1_000].min
end
end
end