summaryrefslogtreecommitdiff
path: root/app/models/wiki_page.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-02 13:57:38 +0000
committerLin Jen-Shin <godfat@godfat.org>2018-07-09 21:13:08 +0800
commit9286f5b9340f92131c320c231a5fb3e51c23bf04 (patch)
tree49bbb5c1ebc03a9fda46791273e949a8e467710f /app/models/wiki_page.rb
parent4ee08b77bc5ae11553d59c182ea8292b77699115 (diff)
downloadgitlab-ce-9286f5b9340f92131c320c231a5fb3e51c23bf04.tar.gz
Use stable gitlab-styles and eliminate offenses
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r--app/models/wiki_page.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index 6cd3993a56d..4b49edb01a5 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -1,3 +1,4 @@
+# rubocop:disable Rails/ActiveRecordAliases
class WikiPage
PageChangedError = Class.new(StandardError)
PageRenameError = Class.new(StandardError)
@@ -190,7 +191,7 @@ class WikiPage
# Returns the String SHA1 of the newly created page
# or False if the save was unsuccessful.
def create(attrs = {})
- update(attrs)
+ update_attributes(attrs)
save(page_details: title) do
wiki.create_page(title, content, format, message)
@@ -216,7 +217,7 @@ class WikiPage
raise PageChangedError
end
- update(attrs)
+ update_attributes(attrs)
if title_changed?
page_details = title