summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 997c19bdb6b..8d7eb788abb 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -22,7 +22,7 @@ class Snippet < ActiveRecord::Base
belongs_to :author, class_name: "User"
has_many :notes, as: :noteable, dependent: :destroy
- delegate :name, :email, to: :author, prefix: true
+ delegate :name, :email, to: :author, prefix: true, allow_nil: true
validates :author, presence: true
validates :project, presence: true