summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-16 17:16:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-16 17:16:49 +0000
commitfcefdb22bfc3a270e213e289c562bea0bd8722ef (patch)
tree17b14373e732950cc918883df746e89a33d1373d /app/models/news.rb
parent7363428703e4a86c3c7b20e5adc00e9ae9428b2e (diff)
downloadredmine-fcefdb22bfc3a270e213e289c562bea0bd8722ef.tar.gz
redmine-fcefdb22bfc3a270e213e289c562bea0bd8722ef.zip
Added several validates_length_of
git-svn-id: http://redmine.rubyforge.org/svn/trunk@593 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r--app/models/news.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index cd130e96d..e9a48846a 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -21,6 +21,8 @@ class News < ActiveRecord::Base
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
validates_presence_of :title, :description
+ validates_length_of :title, :maximum => 60
+ validates_length_of :summary, :maximum => 255
# returns latest news for projects visible by user
def self.latest(user=nil, count=5)