From: Nihad Abbasov Date: Sat, 1 Dec 2012 11:19:16 +0000 (-0800) Subject: remove length limit from notes X-Git-Tag: v4.0.0rc1~109^2~2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=24e172597a3e0c1b75e2d96fc8c7f1752f9a6c03;p=wvm%2Fgitlab.git remove length limit from notes --- diff --git a/app/models/note.rb b/app/models/note.rb index 60846e048..da15a1735 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -32,11 +32,10 @@ class Note < ActiveRecord::Base delegate :name, to: :project, prefix: true delegate :name, :email, to: :author, prefix: true - validates :project, presence: true - validates :note, presence: true, length: { within: 0..5000 } + validates :note, :project, presence: true validates :attachment, file_size: { maximum: 10.megabytes.to_i } - mount_uploader :attachment, AttachmentUploader + mount_uploader :attachment, AttachmentUploader # Scopes scope :common, ->{ where(noteable_id: nil) }