Commit e9212b0aa2de2a02e6c7b685f3cb5d7f9d3841f0

Authored by Dmitriy Zaporozhets
2 parents c177593e 24e17259

Merge pull request #2141 from NARKOZ/notes-text-limit

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) }