diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-18 09:45:37 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-18 09:45:37 -0200 |
commit | dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8 (patch) | |
tree | 761277abcc2c06ec3e649239735c6bd5e18ed328 | |
parent | 5f60735194290172533521e417f81bb3075dc867 (diff) | |
download | rails-dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8.tar.gz rails-dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8.tar.bz2 rails-dc33cd620828d58c40cb6c5a5bdba8e259b0e0f8.zip |
Use unless instead of if nil?
-rw-r--r-- | actionpack/lib/action_view/helpers/number_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index b60a51997d..e3c5924b82 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -48,7 +48,7 @@ module ActionView # 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) |