Skip to content
Browse files

Revert "Fix example using wrong method name"

This reverts commit 5745b25.
  • Loading branch information...
1 parent 6c375d9 commit 2d78ee0de632010c2f4a8ca370b4752959693e21 @lifo lifo committed Dec 19, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/core_ext/float/rounding.rb
View
6 activesupport/lib/active_support/core_ext/float/rounding.rb
@@ -12,9 +12,9 @@ def self.included(base) #:nodoc:
# Rounds the float with the specified precision.
#
# x = 1.337
- # x.round_with_precision # => 1
- # x.round_with_precision(1) # => 1.3
- # x.round_with_precision(2) # => 1.34
+ # x.round # => 1
+ # x.round(1) # => 1.3
+ # x.round(2) # => 1.34
def round_with_precision(precision = nil)
precision.nil? ? round_without_precision : (self * (10 ** precision)).round / (10 ** precision).to_f
end

0 comments on commit 2d78ee0

Please sign in to comment.
Something went wrong with that request. Please try again.