summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2016-12-30 13:26:30 +0000
committerMark Fletcher <mark@gitlab.com>2017-02-14 11:16:34 +0530
commit109e8ef4485fb45f0a50690e732ee2b9c6e910b0 (patch)
tree15dd62b3ef2655fe819e2d2de126999ac3f3d092 /app
parent865e3fcc13834a1503b8a6c3f7cc7826bacdcc9f (diff)
downloadgitlab-ce-109e8ef4485fb45f0a50690e732ee2b9c6e910b0.tar.gz
Make WikiPage comparable according to StaticModel interface
* Add WikiPage#id method returning associated SHA for wiki page commit
Diffstat (limited to 'app')
-rw-r--r--app/models/wiki_page.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index 6347b274341..2caebb496db 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -207,6 +207,10 @@ class WikiPage
'projects/wikis/wiki_page'
end
+ def id
+ page.version.to_s
+ end
+
private
def set_attributes