| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is a follow up to: https://github.com/rails/rails/commit/07c70245a128cfe42f134be8759963dc98f1a63e
As suggested by @fxn this comment should not be visible in the API:
https://github.com/rails/rails/commit/07c70245a128cfe42f134be8759963dc98f1a63e#commitcomment-5331658
|
|
|
|
|
| |
The previous implementation was broken because JRuby (1.7.10) doesn't
have a code converter for UTF-8 to UTF8-MAC.
|
|
|
|
| |
Closes #13993.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
guides/source/active_record_validations.md
guides/source/api_documentation_guidelines.md
guides/source/configuring.md
|
| |
| |
| |
| | |
kind of exception we should expect for this internal comment.
|
| | |
|
| |
| |
| |
| | |
Decouple the code from the particular Ruby version.
|
| |
| |
| |
| | |
unexpected circular dependency error
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Deprecate custom BigDecimal serialization
Conflicts:
activesupport/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was backported for Ruby 1.8 support and is no longer needed.
Signed-off-by: David Celis <me@davidcel.is>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rails currently provides an extension to BigDecimal that redefines how
it is serialized to YAML. However, as noted in #12467, this does not
work as expected. When ActiveSupport is required, BigDecimal YAML
serialization does not maintain the object type. It instead ends up
serializing the number represented by the BigDecimal itself which, when
loaded by YAML later, becomes a Float:
```ruby
require 'yaml'
require 'bigdecimal'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
require 'active_support/all'
yaml = BigDecimal('13.37').to_yaml
YAML.load(yaml).class
```
@tenderlove posits that we should deprecate the custom BigDecimal
serialization and let Ruby handle it. For the time being, users who
require this serialization for backwards compatibility can manually
`require 'active_support/core_ext/big_decimal/yaml_conversions'`.
This will close #12467 and deprecate the custom BigDecimal#to_yaml.
Signed-off-by: David Celis <me@davidcel.is>
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Boolean parser blows up on a Fixnum.
Conflicts:
activesupport/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Boolean parsing breaks on non strings (i.e. integer 1|0)
- Symbol parsing breaks on non strings.
- BigDecimal parsing breaks due to missing require.
- Update changelog.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Extend the solution from the fix for #12163 to the general case where
`Time` methods are wrapped with a time zone.
Fixes #12596.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This behavior is only work out-of-box with minitest and also add a
downside to run after each test case, even if we don't used the travel
or travel_to methods
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MessageEncryptor has :serializer option, where any serializer object can
be passed. This commit make it possible to set this serializer from configuration
level.
There are predefined serializers (:marshal_serializer, :json_serialzier)
and custom serializer can be passed as String, Symbol (camelized and
constantized in ActionDispatch::Session namepspace) or serializer object.
Default :json_serializer was also added to generators to provide secure
defalt.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Both Time#xmlschema and DateTime#xmlschema can accept nil values for the
fraction_digits parameter. This commit makes this so for TimeWithZone
values as well.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The subsecond fraction digits had been hardcoded to 3. This forced all
timestamps to include the subsecond digits with no way to customize the
value. While the subsecond format is part of the ISO8601 spec, it is not
adhered to by all parsers (notably mobile clients). This adds the
ability to customize the number of digits used, optionally setting them
to 0 in order to eliminate the subsecond fraction entirely:
ActiveSupport::JSON::Encoding.subsecond_fraction_digits = 0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently if a time is changed during DST overlap in the autumn then the
method `period_for_local` will return the DST period. However if the
original time is not DST then this can be surprising and is not what is
generally wanted. This commit changes that behavior to maintain the current
period if it's in the list of periods returned by `periods_for_local`.
It is possible to alter the behavior of `period_for_local` by specifying a
second argument but since we may be change from another time that could be
either DST or not then this would give inconsistent results.
Fixes #12163.
|
| | |
| | |
| | |
| | | |
The file is config/secrets.yml, not config/initializers/secrets.yml.
|
|\ \ \
| | | |
| | | | |
Update Error Message when secrets.secret_key_base isn't given
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
sup haters
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change breaks tests in activesupport/test/core_ext/module_test.rb:
* test_delegation_exception_backtrace
* test_delegation_exception_backtrace_with_allow_nil
This reverts commit 0167765e3f84260522bc2f32d926c1f5dd44957c.
|
| | |
| | |
| | |
| | | |
any line number maths
|
|\ \ \
| | | |
| | | | |
[ci skip] Grammar correction
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Clarify behavior of json_escape [ci skip]
|