diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2016-03-29 17:48:25 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2016-03-29 17:48:25 +0100 |
commit | cd736dbfa4c81166797a55d4877aac92e45327f8 (patch) | |
tree | 2d9ffc12e6931f0aee72fb047d4cd4b06a67ebb7 /activerecord/CHANGELOG.md | |
parent | f734dd1111b09deb4f1b20629d753f75f04ca17a (diff) | |
parent | 78ea4c598547c46cdfcf71aa484782ac903a3040 (diff) | |
download | rails-cd736dbfa4c81166797a55d4877aac92e45327f8.tar.gz rails-cd736dbfa4c81166797a55d4877aac92e45327f8.tar.bz2 rails-cd736dbfa4c81166797a55d4877aac92e45327f8.zip |
Merge pull request #24315 from kenta-s/add_empty_to_finder_methods
Delegate some additional methods in querying.rb
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 13 |
1 files changed, 13 insertions, 0 deletions
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. |