diff options
author | kennyj <kennyj@gmail.com> | 2013-07-24 23:05:26 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-07-24 23:24:22 +0900 |
commit | 19291bff34ce8e36117f07e6e1d546d8ee47529f (patch) | |
tree | 72106cc6ddd76def86a70963fe1320d281c97523 /guides/code | |
parent | 3a4d0b1e2975122defe86de31fc35ab2dcd9b984 (diff) | |
download | rails-19291bff34ce8e36117f07e6e1d546d8ee47529f.tar.gz rails-19291bff34ce8e36117f07e6e1d546d8ee47529f.tar.bz2 rails-19291bff34ce8e36117f07e6e1d546d8ee47529f.zip |
Simplify select_one method.
The select_all method always returns ActiveRecord::Result instance,
and the ActiveRecord::Result includes Enumerable mixin.
If #empty?, #first method returns nil. Thus we can simplify this method.
Diffstat (limited to 'guides/code')
0 files changed, 0 insertions, 0 deletions