Permalink
Browse files

Change deprecated validates_presence_of

In Validations section the example contained "validates_presence_of" which is deprecated. It should be "validates :name, presence: true"
  • Loading branch information...
1 parent 3bacdde commit 9d62ebb0d025150aa685845bb482deeafc65af9c @zoltan-nz zoltan-nz committed Apr 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/active_record_basics.md
@@ -319,7 +319,7 @@ A quick example to illustrate:
```ruby
class User < ActiveRecord::Base
- validates_presence_of :name
+ validates :name, presence: true
end
User.create # => false

0 comments on commit 9d62ebb

Please sign in to comment.