summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-25 15:58:09 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-25 15:58:09 +0400
commit3e695acfa2f4035431cb325645b3114d06e43105 (patch)
tree34f9ee77f6888c23e0ee7c4d8055b65b35b1d0e7 /app/models/snippet.rb
parente3351287b4284af95390835bc75a6c3c461f04ba (diff)
downloadgitlab-ce-3e695acfa2f4035431cb325645b3114d06e43105.tar.gz
Notes fixed
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 5d09c6b6e47..1b37ffe8339 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -20,6 +20,7 @@ class Snippet < ActiveRecord::Base
attr_accessible :title, :content, :file_name, :expires_at, :private
belongs_to :author, class_name: "User"
+
has_many :notes, as: :noteable, dependent: :destroy
delegate :name, :email, to: :author, prefix: true, allow_nil: true