summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
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)