summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-14 08:34:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-14 08:34:05 +0300
commit190e483fb4b5edb6d8dfa71b67dc52da402ddab9 (patch)
treeaa769f7be3c6a827c5c663028bd6202ed43b0740 /app/models/snippet.rb
parentb01f8b63c2c13f8d6b9111771fb4f1422214d91c (diff)
downloadgitlab-ce-190e483fb4b5edb6d8dfa71b67dc52da402ddab9.tar.gz
Rework of milestones
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