Commit 24e172597a3e0c1b75e2d96fc8c7f1752f9a6c03

Authored by Nihad Abbasov
1 parent c177593e

remove length limit from notes

Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
app/models/note.rb
@@ -32,11 +32,10 @@ class Note < ActiveRecord::Base @@ -32,11 +32,10 @@ class Note < ActiveRecord::Base
32 delegate :name, to: :project, prefix: true 32 delegate :name, to: :project, prefix: true
33 delegate :name, :email, to: :author, prefix: true 33 delegate :name, :email, to: :author, prefix: true
34 34
35 - validates :project, presence: true  
36 - validates :note, presence: true, length: { within: 0..5000 } 35 + validates :note, :project, presence: true
37 validates :attachment, file_size: { maximum: 10.megabytes.to_i } 36 validates :attachment, file_size: { maximum: 10.megabytes.to_i }
38 37
39 - mount_uploader :attachment, AttachmentUploader 38 + mount_uploader :attachment, AttachmentUploader
40 39
41 # Scopes 40 # Scopes
42 scope :common, ->{ where(noteable_id: nil) } 41 scope :common, ->{ where(noteable_id: nil) }