Skip to content

Commit

Permalink
Ordering author tag pages (#2033)
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored Jan 17, 2018
1 parent 9d3073e commit 1230a73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ def self.tagged_nodes_by_author(tagname, user_id)
@wildcard = true
Node.where('term_data.name LIKE(?)', tagname[0..-2]+'%')
.includes(:node_tag, :tag)
.order('node.nid DESC')
.references(:term_data)
.where('node.uid = ?', user_id)
else
Node.where('term_data.name = ?', tagname)
.includes(:node_tag, :tag)
.order('node.nid DESC')
.references(:term_data)
.where('node.uid = ?', user_id)
end
Expand Down

0 comments on commit 1230a73

Please sign in to comment.