Skip to content

Commit

Permalink
Rename the draft method to save_draft for clarity (publiclab#8693)
Browse files Browse the repository at this point in the history
  • Loading branch information
saitgulmez authored and billymoroney1 committed Dec 28, 2021
1 parent a320bdc commit 1db65e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1db65e7

Please sign in to comment.