Commit Graph

24 Commits

Author SHA1 Message Date
Jeremy Kemper dc1816da30 Ruby 1.9: fix number precision test 2009-11-04 16:10:24 -08:00
wmoxam 98450fd168 Fix number_to_precision rounding error [#2071 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 02:05:10 +01:00
Yehuda Katz + Carl Lerche 86fc43fd58 ActionPack components should no longer have undeclared dependencies.
* Tests can be run in isolation
  * Dependencies added
  * A few tests modified to avoid depending on AS deps 
    not depended on my files they were testing
2009-06-08 13:34:07 -07:00
Travis Briggs 98eaa2c683 Ensure number_to_human_size does not strip zeros from the end [#1763 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-05-17 19:02:50 +02:00
rpheath 1ab2ff58ed Fixed number_to_phone to work with 7 digit numbers [#2176 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 12:53:44 +00:00
Clemens Kofler fea7771d22 Updated NumberHelper: Full i18n support (except number_to_phone), consolidated API (almost all methods now support :precision, :delimiter and :separator). Added deprecation notices for old API. Added tests for new options [#716 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-29 21:47:02 -05:00
Clemens Kofler 0f43de644e Refactored NumberHelper API to accept arguments as an options hash [#666 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-21 13:05:27 -05:00
Joshua Peek 17d4164a16 Introduce ActionView::TestCase for testing view helpers. 2008-04-19 13:08:24 -05:00
David Heinemeier Hansson 0e62c773f6 Fixed NumberHelper#number_with_precision to properly round in a way that works equally on Mac, Windows, Linux (closes #11409, #8275, #10090, #8027) [zhangyuanyi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-24 21:12:55 +00:00
David Heinemeier Hansson 3c0fd445c0 Added :format option to NumberHelper#number_to_currency to enable better localization support #11149 [lylo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 22:08:25 +00:00
Jeremy Kemper 9d79e0668d Fix number_to_human_size incorrectly removing trailing zeros. Closes #10099 [libc, developingchris]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:59:10 +00:00
Jeremy Kemper 9d755f1983 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Michael Koziarski ab5e1f15a6 Fix number_to_human_size when using different precisions. Closes #7536. [RichardStrand, mpalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-08-05 01:00:54 +00:00
Jeremy Kemper 2823a56f14 Deprecation: remove deprecated human_size helper alias. Use number_to_human_size instead.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 05:18:49 +00:00
Jeremy Kemper 0eacdcf9a3 Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:16:55 +00:00
Jeremy Kemper 2570f408f0 Work around a cross-platform number_to_precision inconsistency in unit tests. Closes #6315. [jesperron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-17 01:00:29 +00:00
David Heinemeier Hansson 1c71a5d25f Upgraded NumberHelper with number_to_phone support international formats to comply with ITU E.123 by supporting area codes with less than 3 digits, added precision argument to number_to_human_size (defaults to 1) (closes #6421) [BobSilva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-22 23:47:18 +00:00
David Heinemeier Hansson a49e7d5c0c Fixed that NumberHelper#number_to_delimiter should respect precision of higher than two digits (closes #6231) [phallstrom]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-09 00:59:19 +00:00
David Heinemeier Hansson 532627452d Added special case for "1 Byte" in NumberHelper#number_to_human_size (closes #5593) [murpyh@rubychan.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4537 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:04:32 +00:00
Marcel Molina 363b79f942 Refactor human_size to exclude decimal place if it is zero.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-19 05:31:48 +00:00
David Heinemeier Hansson afbfde9357 Fixed that number_to_currency(1000, {:precision => 0})) should return "$1,000", instead of "$1,000." #2122 [sd@notso.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-09 08:43:02 +00:00
David Heinemeier Hansson 665ab93761 Added :extension option to NumberHelper#number_to_phone #1361 [delynnb]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-16 06:33:10 +00:00
David Heinemeier Hansson 988dc1e862 Improved tests for NumberHelper
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-13 04:49:01 +00:00
David Heinemeier Hansson 7140f65355 Moved TextHelper#human_size to NumberHelper#number_to_human_size, but kept an deprecated alias to the old method name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-12 08:04:38 +00:00