- 20 6月, 2017 1 次提交
-
-
由 Pat Allan 提交于
The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
- 02 4月, 2016 1 次提交
-
-
由 Pan GaoYong 提交于
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.
-
- 12 12月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
These classes are not meant to be public.
-
- 04 12月, 2013 5 次提交
-
-
由 Carlos Antonio da Silva 提交于
This reads a lot better, and we won't need to try start_with? for blank delimiters. Also rename method name to read better.
-
由 Carlos Antonio da Silva 提交于
The conversion without area code already changed the passed number in place, so change the other method to do the same.
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
- 03 12月, 2013 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
- 02 7月, 2013 1 次提交
-
-
由 Matt Bridges 提交于
Due to the overall complexity of each method individually as well as the global shared private module methods, this pulls each helper into it's own converter class inheriting from a generic `NumberBuilder` class. * The `NumberBuilder` class contains the private methods needed for each helper method an eliminates the need for special definition of specialized private module methods. * The `ActiveSupport::NumberHelper::DEFAULTS` constant has been moved into the `NumberBuilder` class because the `NumberBuilder` is the only class which needs access to it. * For each of the builders, the `#convert` method is broken down to smaller parts and extracted into private methods for clarity of purpose. * Most of the mutation that once was necessary has now been eliminated. * Several of the mathematical operations for percentage, delimited, and rounded have been moved into private methods to ease readability and clarity. * Internationalization is still a bit crufty, and definitely could be improved, but it is functional and a bit easier to follow. The following helpers were extracted into their respective classes. * `#number_to_percentage` -> `NumberToPercentageConverter` * `#number_to_delimited` -> `NumberToDelimitedConverter` * `#number_to_phone` -> `NumberToPhoneConverter` * `#number_to_currency` -> `NumberToCurrencyConverter` * `#number_to_rounded` -> `NumberToRoundedConverter` * `#number_to_human_size` -> `NumberToHumanSizeConverter` * `#number_to_human` -> `NumberToHumanConverter`
-