aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/timestamp.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-02 13:10:18 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-02 13:10:18 -0200
commitbc8cc56a2ae0b73276782d66b7dceba1ecd294a2 (patch)
tree61372ff245fc96d89b3f94428556ba90f460840a /activerecord/lib/active_record/timestamp.rb
parent9fd6011f40a0fb7792867ef1a48ac0dbbb2ffee0 (diff)
downloadrails-bc8cc56a2ae0b73276782d66b7dceba1ecd294a2.tar.gz
rails-bc8cc56a2ae0b73276782d66b7dceba1ecd294a2.tar.bz2
rails-bc8cc56a2ae0b73276782d66b7dceba1ecd294a2.zip
Prefer object/nil over `true`/`false`
This is the project guideline and the reasons are: * That follows standard Ruby semantics. * Allows the implementation to avoid artificial code like !! or something ? true : false * You do not need to rely on the exact type of 3rd party code. For example, if your method returns str.end_with?('foo') you do not need to make sure end_with? returns a singleton. Your predicate just propagates predicate semantics up regardless of what end_with? returns.
Diffstat (limited to 'activerecord/lib/active_record/timestamp.rb')
0 files changed, 0 insertions, 0 deletions