diff options
Diffstat (limited to 'app/models/note.rb')
| -rw-r--r-- | app/models/note.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index c655eb807eb..aa034ef483e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -42,6 +42,14 @@ class Note < ActiveRecord::Base mount_uploader :attachment, AttachmentUploader + def self.create_status_change_note(noteable, author, status) + create({ :noteable => noteable, + :project => noteable.project, + :author => author, + :note => "_Status changed to #{status}_" }, + :without_protection => true) + end + def notify @notify ||= false end |
