diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-02 23:14:31 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-26 15:48:30 -0400 |
commit | 8773f339a33cf31f979013cf306e5fca5fe66a89 (patch) | |
tree | 967af00c09d604fae611e383f05e02f76d5c5680 /app/models/snippet.rb | |
parent | c0faf91ff23815404a95cf4510b43dcf5e331c4f (diff) | |
download | gitlab-ce-8773f339a33cf31f979013cf306e5fca5fe66a89.tar.gz |
Minor model spec cleanups
Snippet model was missing project association
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 90fada3c114..8c3167833aa 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -24,7 +24,8 @@ class Snippet < ActiveRecord::Base default_value_for :visibility_level, Snippet::PRIVATE - belongs_to :author, class_name: "User" + belongs_to :author, class_name: 'User' + belongs_to :project has_many :notes, as: :noteable, dependent: :destroy |