Browse files

Merge pull request #102 from xenda/master

Small fix to update the README using more up to date conventions.
  • Loading branch information...
2 parents c6219b0 + da4252f commit fabd2ce24f033e5a20ca447064e4f9af0a2177e6 @xenda xenda committed May 28, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/README.rdoc
@@ -61,10 +61,10 @@ A short rundown of some of the major features:
* Validation rules that can differ for new or existing objects.
class Account < ActiveRecord::Base
- validates_presence_of :subdomain, :name, :email_address, :password
- validates_uniqueness_of :subdomain
- validates_acceptance_of :terms_of_service, :on => :create
- validates_confirmation_of :password, :email_address, :on => :create
+ validates :subdomain, :name, :email_address, :password, presence: true
+ validates :subdomain, uniqueness: true
+ validates :terms_of_service, acceptance: true, on: :create
+ validates :password, :email_address, confirmation: true, on: :create
{Learn more}[link:classes/ActiveRecord/Validations.html]

0 comments on commit fabd2ce

Please sign in to comment.