Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use unless instead of if nil?

  • Loading branch information...
commit dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8 1 parent 5f60735
@spastorino spastorino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/number_helper.rb
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.