mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
06dc3fba46
commit
e86a1bd1d7
1 changed files with 1 additions and 2 deletions
|
@ -119,12 +119,11 @@
|
||||||
|
|
||||||
*Jeremy Daer*
|
*Jeremy Daer*
|
||||||
|
|
||||||
* Delegate `empty?`, `none?` and `one?`. Now they can be invoked as model class methods.
|
* Delegate `none?` and `one?`. Now they can be invoked as model class methods.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
# When no record is found on the table
|
# When no record is found on the table
|
||||||
Topic.empty? # => true
|
|
||||||
Topic.none? # => true
|
Topic.none? # => true
|
||||||
|
|
||||||
# When only one record is found on the table
|
# When only one record is found on the table
|
||||||
|
|
Loading…
Reference in a new issue