aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/README.rdoc
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-05-30 22:53:52 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-05-30 22:53:52 +0530
commitec74763c393c6a5f54eb64f0313610aead7f815a (patch)
tree39e3712c4cfc589083ed5072b6b8373361334441 /activerecord/README.rdoc
parent0406a13fac7f809cb511e45583259e66d8739b4f (diff)
parent032f502f1221129d8446d3e25cd8956469b43456 (diff)
downloadrails-ec74763c393c6a5f54eb64f0313610aead7f815a.tar.gz
rails-ec74763c393c6a5f54eb64f0313610aead7f815a.tar.bz2
rails-ec74763c393c6a5f54eb64f0313610aead7f815a.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/README.rdoc')
-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]