public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Description & name validations run on update
Michael Hartl (author)
Wed Feb 20 15:21:42 -0800 2008
commit  aff628f38b563a1001ee4af73deb4f299de6df29
tree    faa6b89daa73af174cab00588ceb20baed08ddb5
parent  2478bb88aee59cbeb6cb2384097553646f48c7a4
...
4
5
6
7
 
8
9
10
11
12
13
 
14
15
16
...
4
5
6
 
7
8
9
10
11
12
13
14
15
16
17
0
@@ -4,13 +4,14 @@ class Person < ActiveRecord::Base
0
   attr_accessible :email, :password, :password_confirmation, :name,
0
                   :description
0
 
0
- validates_presence_of :email, :name, :description
0
+ validates_presence_of :email
0
   validates_presence_of :password, :if => :password_required?
0
   validates_presence_of :password_confirmation, :if => :password_required?
0
   validates_length_of :password, :within => 4..40, :if => :password_required?
0
   validates_confirmation_of :password, :if => :password_required?
0
   validates_length_of :email, :within => 3..100
0
   validates_uniqueness_of :email
0
+ validates_presence_of :name, :description, :on => :update
0
   
0
   before_save :downcase_email, :encrypt_password
0
   

Comments

    No one has commented yet.