Vote #69386
未完了use unless in control structures where it improves readability
0%
説明
Use unless or until in control structures instead of if ! or while ! where it improves readability.
journals
I think @if blah.present?@ is easier to read than @unless blah.blank?@ or @if !blah.blank?@, so we might switch to this in some cases you point out.
--------------------------------------------------------------------------------
yes that does makes more sense indeed. I looked it up "here":http://api.rubyonrails.org/classes/Object.html#method-i-present-3F , *present?* is internally defined as *!blank?*
--------------------------------------------------------------------------------