diff options
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 2c941499f1f..bfd28684f20 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -1,6 +1,8 @@ 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 @@ -9,7 +11,6 @@ class Snippet < ActiveRecord::Base :email, to: :author, prefix: true - attr_protected :author, :author_id, :project, :project_id validates_presence_of :project_id validates_presence_of :author_id @@ -46,11 +47,11 @@ class Snippet < ActiveRecord::Base 0 end - def name + def name file_name end - def mode + def mode nil end |