Added several validates_length_of
git-svn-id: http://redmine.rubyforge.org/svn/trunk@593 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
7363428703
commit
fcefdb22bf
11 files changed
+14
-1
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user