aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/number_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove user-specified delimiter from start when no area code is present (in ↵Mac Martine2011-10-121-0/+1
| | | | number_to_phone)
* Ensure number helpers can handle HTML safe strings - closes #1597.Andrew White2011-06-101-0/+7
|
* removed deprecated methods, and related tests, from ActionPackJosh Kalderimis2011-05-241-9/+0
|
* added a :prefix option to number_to_human_sizeDiego Carrion2011-04-271-0/+11
|
* added test for number_to_phone with an empty string and area code trueDiego Carrion2011-04-251-0/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* fixes an issue with number_to_human when converting values which are less ↵Josh Kalderimis2011-03-161-1/+3
| | | | | | than 1 but greater than -1 [#6576 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Action Pack typos.R.T. Lechow2011-03-051-1/+1
|
* Fixed number_with_precision rounding error [#6182 state:resolved]Don Wilson2010-12-181-0/+5
|
* Revert "Fixed number_with_precision rounding error [#6182 state:resolved]"Piotr Sarnacki2010-12-171-5/+0
| | | | This reverts commit 006ec77e60163d57d655479602230672d98e0f10.
* Fixed number_with_precision rounding error [#6182 state:resolved]Don Wilson2010-12-171-0/+5
|
* Added :negative_format option to number_to_currency function [#5894 ↵Don Wilson2010-11-021-0/+4
| | | | | | state:resolved] Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
* number_to_phone always return safeSantiago Pastorino2010-10-171-1/+2
|
* Make number_to_human and number_with_precision work with negativesSantiago Pastorino2010-09-051-0/+2
|
* Fix indentation errorsSantiago Pastorino2010-09-051-47/+47
|
* Fix number_to_human(0) exception [#5532 state:resolved]Ben Sharpe2010-09-051-0/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Removed deprecated APIs in text and number helpers [#5156 state:resolved]Łukasz Strzałkowski2010-07-261-27/+0
| | | | | | They're deprecated since 2008. It's time to get rid of them. Signed-off-by: José Valim <jose.valim@gmail.com>
* Add a test that used to fail but is fixed now [#3417 state:resolved]wycats2010-04-121-0/+1
|
* Fix error in number_with_precision with :significant option and zero value ↵Bernardo de Pádua2010-04-011-0/+9
| | | | | | [#4306 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename unsignificant to insignificant.José Valim2010-03-231-8/+8
|
* NumberHelper methods should now return html_safe strings (when the inputs ↵Bernardo de Pádua2010-03-221-22/+121
| | | | | | are valid numbers or are html_safe). Also adds :raise => true (used internaly) to make the number helpers throw InvalidNumberError when the given number is invalid. Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds number_to_human and several improvements in NumberHelper. [#4239 ↵Bernardo de Pádua2010-03-221-19/+151
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Ruby 1.9: fix number precision testJeremy Kemper2009-11-041-1/+1
|
* Fix number_to_precision rounding error [#2071 state:resolved]wmoxam2009-08-081-0/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* ActionPack components should no longer have undeclared dependencies.Yehuda Katz + Carl Lerche2009-06-081-13/+29
| | | | | | | * 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
* Ensure number_to_human_size does not strip zeros from the end [#1763 ↵Travis Briggs2009-05-171-0/+4
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixed number_to_phone to work with 7 digit numbers [#2176 state:resolved]rpheath2009-03-091-0/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Updated NumberHelper: Full i18n support (except number_to_phone), ↵Clemens Kofler2008-07-291-22/+26
| | | | | | 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>
* Refactored NumberHelper API to accept arguments as an options hash [#666 ↵Clemens Kofler2008-07-211-1/+27
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Introduce ActionView::TestCase for testing view helpers.Joshua Peek2008-04-191-2/+2
|
* Fixed NumberHelper#number_with_precision to properly round in a way that ↵David Heinemeier Hansson2008-03-241-0/+2
| | | | | | 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
* Added :format option to NumberHelper#number_to_currency to enable better ↵David Heinemeier Hansson2008-03-171-0/+1
| | | | | | localization support #11149 [lylo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9052 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix number_to_human_size incorrectly removing trailing zeros. Closes #10099 ↵Jeremy Kemper2008-02-021-0/+1
| | | | | | [libc, developingchris] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix number_to_human_size when using different precisions. Closes #7536. ↵Michael Koziarski2007-08-051-0/+4
| | | | | | [RichardStrand, mpalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: remove deprecated human_size helper alias. Use ↵Jeremy Kemper2007-03-131-6/+0
| | | | | | number_to_human_size instead. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a consistent load path to avoid double requires. Fix some scattered Ruby ↵Jeremy Kemper2007-01-281-2/+1
| | | | | | warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Work around a cross-platform number_to_precision inconsistency in unit ↵Jeremy Kemper2006-12-171-3/+7
| | | | | | tests. Closes #6315. [jesperron] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Upgraded NumberHelper with number_to_phone support international formats to ↵David Heinemeier Hansson2006-10-221-29/+55
| | | | | | 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
* Fixed that NumberHelper#number_to_delimiter should respect precision of ↵David Heinemeier Hansson2006-10-091-0/+9
| | | | | | higher than two digits (closes #6231) [phallstrom] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added special case for "1 Byte" in NumberHelper#number_to_human_size (closes ↵David Heinemeier Hansson2006-07-051-0/+1
| | | | | | #5593) [murpyh@rubychan.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4537 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor human_size to exclude decimal place if it is zero.Marcel Molina2006-01-191-13/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that number_to_currency(1000, {:precision => 0})) should return ↵David Heinemeier Hansson2005-09-091-0/+2
| | | | | | "$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
* Added :extension option to NumberHelper#number_to_phone #1361 [delynnb]David Heinemeier Hansson2005-06-161-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved tests for NumberHelperDavid Heinemeier Hansson2005-04-131-1/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved TextHelper#human_size to NumberHelper#number_to_human_size, but kept ↵David Heinemeier Hansson2005-04-121-0/+23
an deprecated alias to the old method name git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de