diff options
author | Wojciech Wnętrzak <w.wnetrzak@gmail.com> | 2015-01-04 09:18:03 +0100 |
---|---|---|
committer | Wojciech Wnętrzak <w.wnetrzak@gmail.com> | 2015-01-20 22:33:42 +0100 |
commit | cb74473db68900d336844d840dda6e10dc03fde1 (patch) | |
tree | bd1a32817e79f25cb7ced1506e302a0642fbb7fb /activerecord/lib/active_record/connection_adapters/postgresql/oid/date.rb | |
parent | 08fe700e2fd57a63d1ee899b63e0e818bc0f4e69 (diff) | |
download | rails-cb74473db68900d336844d840dda6e10dc03fde1.tar.gz rails-cb74473db68900d336844d840dda6e10dc03fde1.tar.bz2 rails-cb74473db68900d336844d840dda6e10dc03fde1.zip |
Add ActiveModel::Errors#details
To be able to return type of validator, one can now call `details`
on Errors instance:
```ruby
class User < ActiveRecord::Base
validates :name, presence: true
end
```
```ruby
user = User.new; user.valid?; user.errors.details
=> {name: [{error: :blank}]}
```
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/oid/date.rb')
0 files changed, 0 insertions, 0 deletions