OSDN Git Service

remove length limit from notes
authorNihad Abbasov <narkoz.2008@gmail.com>
Sat, 1 Dec 2012 11:19:16 +0000 (03:19 -0800)
committerNihad Abbasov <narkoz.2008@gmail.com>
Sat, 1 Dec 2012 11:19:16 +0000 (03:19 -0800)
app/models/note.rb

index 60846e0..da15a17 100644 (file)
@@ -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) }