Permalink
Browse files

Use unless instead of if nil?

  • Loading branch information...
1 parent 5f60735 commit dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8 @spastorino spastorino committed Oct 18, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/number_helper.rb
@@ -48,7 +48,7 @@ def initialize(number)
# number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".")
# => +1.123.555.1234 x 1343
def number_to_phone(number, options = {})
- return nil if number.nil?
+ return nil unless number
begin
Float(number)

0 comments on commit dc33cd6

Please sign in to comment.