aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/number_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* File encoding is defaulted to utf-8 in Ruby >= 2.1Akira Matsuda2015-09-181-1/+0
|
* - Extracted `DELIMITED_REGEX` to `delimited_regex` method and made use of ↵Vipul A M2015-08-281-0/+2
| | | | | | | | | | user passed `options[:delimited_regex]` if available. Changed `DELIMITED_REGEX` to `DEFAULT)DELIMITED_REGEX` to signify what it means. - Added tests for number to delimited and number to currency in both actionview and activesupport. Changes Changes
* `number_to_percentage` and `precision: 0` work with `NAN` and `INFINITY`.Yves Senn2015-03-061-0/+4
| | | | Closes #19227.
* reload I18n as we are defining `:ts` localeKuldeep Aggarwal2014-06-151-0/+2
| | | | fix build- see https://travis-ci.org/rails/rails/jobs/27578159#L2913.
* Fix AS::NumberHelper results with rationalsJuanjo Bazán2014-05-311-0/+1
| | | | | | | | | | :precision was incorrectly being applied to Rationals before: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.3" after: ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2 => "3.33"
* fix `number_to_percentage` with `Float::NAN`, `Float::INFINITY`.Yves Senn2014-03-171-0/+3
| | | | | | | Closes #14405. This is a follow-up to 9e997e9039435617b6a844158f5437e97f6bc107 to restore the documented behavior.
* Escape format, negative_format and units options of number helpersRafael Mendonça França2014-02-181-0/+39
| | | | | | | Previously the values of these options were trusted leading to potential XSS vulnerabilities. Fixes: CVE-2014-0081
* Escape the unit value provided to number_to_currencyMichael Koziarski2013-12-021-1/+2
| | | | | | Previously the unit values were trusted leading to potential XSS vulnerabilities. Fixes: CVE-2013-6415
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-0/+151