Skip to content

Commit

Permalink
Sorting articles by publication date and not creation date in the admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric de Villamil authored and mvz committed Feb 4, 2010
1 parent 772714f commit ffef8ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def search_no_draft_paginate(search_hash, paginate_hash)
list_function << 'category(search_hash[:category])'
end

paginate_hash[:order] = 'created_at DESC'
paginate_hash[:order] = 'published_at DESC'
list_function << "paginate(paginate_hash)"
eval(list_function.join('.'))
end
Expand Down

0 comments on commit ffef8ce

Please sign in to comment.