| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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
|
| |
|
|
|