| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The api for filters with classes change and the guides weren't updated.
Now the class must respond for methods with the same name as the filter,
so the `before_action` calls a `before` method, and so on.
The method `#filter` has been deprecated in 4.0.0 and has been removed
in 4.1.0: #7560
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Clarify behavior of json_escape [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The behavior of json_escape was fixed in 2f1c5789, but the doc
changes and example in that commit incorrectly indicated that the
return value would be html-safe. Since quotation marks are
preserved, the raw value is not safe to use in other contexts
(specifically HTML attributes).
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix iterating over DateTime by doing strict checking for Time objects
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
- Fixes #13667
|