diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-11-19 14:20:09 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-11-19 14:20:09 +0300 |
commit | 23c5473cc0bd9b9034c5671fbea1356b0fb531e5 (patch) | |
tree | 1e3360ab65b6a9d771de97d7d1fccfeba2e16d10 /app/models/note.rb | |
parent | 2c7d8678623a9e207d54e2e39d7eef9e2f77cb47 (diff) |
added spinach tests
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index d53f568a671..39645f8f1ad 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -46,6 +46,7 @@ class Note < ActiveRecord::Base validates :noteable_id, presence: true, if: ->(n) { n.noteable_type.present? && n.noteable_type != 'Commit' } validates :commit_id, presence: true, if: ->(n) { n.noteable_type == 'Commit' } + validates :author, presence: true, if: ->(n) { n.is_award } mount_uploader :attachment, AttachmentUploader |