| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).
Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).
That cop and enforced style will reduce the our code review cost.
|
|
|
|
|
|
|
|
|
|
| |
The `number_to_human_size` helpers in Action View and Active Support
calculate the "human size" with a base of 1024. The examples should
reflect that so they don't confuse the reader.
The updated documentations use the values from:
helper.number_to_human_size(1500)
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
|
|
|
|
| |
The `delimiter_pattern` option was not present on the documentaion of
the helper.
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
| |
The option was deprecated in #21191.
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, this method formats US number. This commit extends its
functionality to format number for other countries with a custom regular
expression.
number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/)
# => 188-1234-5678
The output phone number is divided into three groups, so the regexp
should also match three groups of numbers.
|
|\
| |
| | |
Add support for Petabyte and Exabyte in number to human size
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've worked on a few applications that have gone through the
internationalization process and had issues because they were using
`number_to_currency`. The minute a user is allowed to change their
locale, they can change the price displayed on a page from 10 US dollars
to 10 Mexican Pesos, which is far from the same amount of money.
Unlike other helpers that rely on i18n, `number_to_currency` does not
produce equivalent results when the locale is changed.
As I've explained this to a few groups of developers now, I thought it
might make for a good caveat in the docs.
|
|
|
| |
Here is correct output of `number_to_percentage(100, format: "%n %”)`
|
| |
|
| |
|
| |
|
|
|
|
| |
onwards.
|
|
|
|
|
| |
The character "*" is unnecessary in option candidates.
This incorrect markup was injected in e8c9aeca .
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previously the values of these options were trusted leading to
potential XSS vulnerabilities.
Fixes: CVE-2014-0081
|
|
|
|
|
|
|
|
|
|
| |
Now users have to explicit mark the unit as safe if they trust it.
Closes #13161
Conflicts:
actionpack/lib/action_view/helpers/number_helper.rb
actionpack/test/template/number_helper_i18n_test.rb
|
|
|
|
|
|
| |
Previously the unit values were trusted leading to potential XSS vulnerabilities.
Fixes: CVE-2013-6415
|
|
|
|
|
| |
This is the only argument that changes over the method calls so it is
better to it be the first one
|
| |
|
|
|