From 1db65e74564fb0fec2f590e51e07c64bdbc1d47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Sait=20G=C3=BClmez?= Date: Thu, 29 Oct 2020 19:46:39 +0300 Subject: [PATCH] Rename the draft method to save_draft for clarity (#8693) --- app/models/node.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/node.rb b/app/models/node.rb index f1802919a2..1b0b6d451b 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -681,7 +681,7 @@ def self.new_note(params) comment: 2, type: 'note') node.status = 4 if author.first_time_poster - node.draft if params[:draft] == "true" + node.save_draft if params[:draft] == "true" if node.valid? # is this not triggering title uniqueness validation? saved = true @@ -1104,7 +1104,7 @@ def self.unlike(nid, user) end # status = 3 for draft nodes,visible to author only - def draft + def save_draft self.status = 3 save self