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.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index c4ee35e0556..592dfdfbb57 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -11,21 +11,20 @@
# updated_at :datetime not null
# file_name :string(255)
# expires_at :datetime
-#
+# type :string(255)
+# private :boolean
class Snippet < ActiveRecord::Base
include Linguist::BlobHelper
attr_accessible :title, :content, :file_name, :expires_at
- belongs_to :project
belongs_to :author, class_name: "User"
has_many :notes, as: :noteable, dependent: :destroy
delegate :name, :email, to: :author, prefix: true, allow_nil: true
validates :author, presence: true
- validates :project, presence: true
validates :title, presence: true, length: { within: 0..255 }
validates :file_name, presence: true, length: { within: 0..255 }
validates :content, presence: true