aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/number_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-36/+36
|
* Enable `Layout/LeadingCommentSpace` to not allow cosmetic changes in the futureRyuta Kamizono2017-12-141-1/+1
| | | | Follow up of #31432.
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* "Use assert_nil if expecting nil. This will fail in minitest 6."Akira Matsuda2016-12-251-7/+7
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* modernizes hash syntax in actionviewXavier Noria2016-08-061-18/+18
|
* applies new string literal convention in actionview/testXavier Noria2016-08-061-23/+23
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* 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