1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Vipul A M
7f23c5d524 - Extracted DELIMITED_REGEX to delimited_regex method and made use of 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
2015-08-28 11:34:17 +05:30
Yves Senn
081a3963ea number_to_percentage and precision: 0 work with NAN and INFINITY.
Closes #19227.
2015-03-06 09:04:51 +01:00
Kuldeep Aggarwal
cffbceeb03 reload I18n as we are defining :ts locale
fix build- see https://travis-ci.org/rails/rails/jobs/27578159#L2913.
2014-06-15 01:11:13 +05:30
Juanjo Bazán
60062cf39a Fix AS::NumberHelper results with rationals
: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"
2014-05-31 20:07:47 +02:00
Yves Senn
378c8d2c99 fix number_to_percentage with Float::NAN, Float::INFINITY.
Closes #14405.

This is a follow-up to 9e997e9039 to restore
the documented behavior.
2014-03-17 10:55:21 +01:00
Rafael Mendonça França
08d0a11a3f Escape format, negative_format and units options of number helpers
Previously the values of these options were trusted leading to
potential XSS vulnerabilities.

Fixes: CVE-2014-0081
2014-02-18 15:38:50 -03:00
Michael Koziarski
b31a7a6f1e Escape the unit value provided to number_to_currency
Previously the unit values were trusted leading to potential XSS vulnerabilities.

Fixes: CVE-2013-6415
2013-12-02 16:41:14 -08:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00
Renamed from actionpack/test/template/number_helper_test.rb (Browse further)