From 78ea4c598547c46cdfcf71aa484782ac903a3040 Mon Sep 17 00:00:00 2001 From: Kenta Date: Tue, 29 Mar 2016 19:50:12 +0900 Subject: Delegate some additional methods in querying.rb --- activerecord/CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index b25b46f9a7..2c17abbe26 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,16 @@ +* Delegate `empty?`, `none?` and `one?`. Now they can be invoked as model class methods. + + Example: + + # When no record is found on the table + Topic.empty? # => true + Topic.none? # => true + + # When only one record is found on the table + Topic.one? # => true + + *Kenta Shirai* + * The form builder now properly displays values when passing a proc form default to the attributes API. -- cgit v1.2.3