aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXenda <xendaccount@xendacentral.com>2012-05-27 23:42:52 -0700
committerXenda <xendaccount@xendacentral.com>2012-05-27 23:42:52 -0700
commitfabd2ce24f033e5a20ca447064e4f9af0a2177e6 (patch)
treea2b7b24940602051bfc1c2ae159a988614bf64f7
parentc6219b021574c4da69fbe0687726763fced9e492 (diff)
parentda4252f4a16bd3166866201a852f938263a3225c (diff)
downloadrails-fabd2ce24f033e5a20ca447064e4f9af0a2177e6.tar.gz
rails-fabd2ce24f033e5a20ca447064e4f9af0a2177e6.tar.bz2
rails-fabd2ce24f033e5a20ca447064e4f9af0a2177e6.zip
Merge pull request #102 from xenda/master
Small fix to update the README using more up to date conventions.
-rw-r--r--activerecord/README.rdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/README.rdoc b/activerecord/README.rdoc
index 30a66ff5f0..d080e0b0f5 100644
--- a/activerecord/README.rdoc
+++ b/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
end
{Learn more}[link:classes/ActiveRecord/Validations.html]