summaryrefslogtreecommitdiff
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-11 20:04:14 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2013-01-11 20:04:14 +0100
commit167f26b90d5b4d4b0306a6f0721444c4132141d8 (patch)
tree2f3e87ceec667260849126d7b677cc68e7d81a9f /app/models/wiki.rb
parent5aada8cc2adef82780e23b859aeabb71f7d1f5ca (diff)
downloadgitlab-ce-167f26b90d5b4d4b0306a6f0721444c4132141d8.tar.gz
Add an ordering scope to Wiki
Diffstat (limited to 'app/models/wiki.rb')
-rw-r--r--app/models/wiki.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 4f113957f99..7f488ca7625 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -25,6 +25,8 @@ class Wiki < ActiveRecord::Base
before_update :set_slug
+ scope :ordered, order("created_at DESC")
+
def to_param
slug
end