Permalink
Browse files

Add rule for `unless` clauses

  • Loading branch information...
1 parent 07d0c1f commit 1a53904654081d556a1bbed97b08b0118ea0998a @AndrewRadev committed Nov 7, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 RUBY-STYLE
View
@@ -76,6 +76,14 @@ personal preferences. The original can be found
* Use non-OO regexps (they won't make the code better). Freely use
=~, $0-9, $~, $` and $' when needed.
+* Never use "unless" if the conditions include more than one term:
+
+ # This is OK:
+ unless user.password_required?
+
+ # This is NOT OK:
+ unless user.facebook_user? or user.crypted_password.blank?
+
== Naming:

0 comments on commit 1a53904

Please sign in to comment.