| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The contract of `_field_changed?` assumes that the old value is always
type cast. That is not the case for the value in `Column#default` as
things are today. It appears there are other public methods that
assume that `Column#default` is type cast, as well. The reason for this
change originally was because the value gets put into `@raw_attributes`
in initialize. This reverts to the old behavior on `Column`, and updates
`initialize` to make sure that the values are in the right format.
|
| |
|
|
|
|
| |
/cc @sgrif
|
|\
| |
| |
| |
| | |
eileencodes/reuse-available-reflection-polymorphic-methods
fix polymorphic? method and reuse it
|
|/
|
|
|
|
| |
Fix polymorphic to check for `options[:polymorphic]` instead of
`options.key? :polymorphic` and then reuse the method `polymorphic?`
method instead of constantly checking the same `options[:polymorphic]`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
before this change, we were allocating AS::SafeBuffer objects that were
being interpolated in to a string, so the safe buffer object was being
thrown away. This change only allocates a string (vs a string *and* a
safebuffer) and interpolates the string.
On my test application, this reduced the AS::SafeBuffer objects from
1527k per request to about 500 per request.
|
|
|
|
|
|
|
|
|
|
|
|
| |
html_escape_interpolated_argument is only used in mutation methods:
https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L174
https://github.com/rails/rails/blob/c07d09559ec171e1904b55c7ad7e8c7d586ca51b/activesupport/lib/active_support/core_ext/string/output_safety.rb#L179
The return value doesn't need to be converted to an AS::SafeBuffer since
we know that the current object is an AS::SafeBuffer and will be
mutated, and the return value from html_escape_interpolated_argument
will be thrown away
|
|\
| |
| | |
Remove unused `initialize_attributes` method
|
| |
| |
| |
| |
| | |
This was previously a hook for a special case related to `serialize`,
which has since been removed.
|
| | |
|
|\ \
| | |
| | | |
Fix typo in ActionController Overview
|
|/ /
| |
| |
| | |
* Should say "sensitive" instead of "sensible"
|
|\ \
| | |
| | | |
File.exist? instead of File.exists? in bin/setup
|
| |/
| |
| |
| |
| | |
File.exists? is deprecated in Ruby 2.1+
https://github.com/ruby/ruby/blob/v2_1_2/file.c#L1413
|
|\ \
| |/
|/| |
Add missing colon to internal [ci skip]
|
|/ |
|
| |
|
|\
| |
| | |
Fix AS::NumberHelper results with rationals
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:precision was incorrectly being applied to Rationals
before:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.3"
after:
ActiveSupport::NumberHelper.number_to_rounded Rational(10, 3), precision: 2
=> "3.33"
|
|\ \
| | |
| | | |
Improvements to ActiveSupport::Notifications.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This inlines casting for the most obvious types. The rest will
follow eventually. I need to put some tests in place, to make sure
that the inlining is not causing regressions.
/cc @sgrif
|
| | |
| | |
| | |
| | | |
the issue tracker. See also #15455 [ci skip]
|
|\ \ \
| | | |
| | | | |
New records should remain new after yaml serialization
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Create Changing Columns on migrations guides [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | | |
duplicating API reference in guides. Also :scissors: [ci skip]
|
|\ \ \ \
| |_|/ /
|/| | | |
Add Total of grouped items to Active Record query interface on guides [ci skip]
|
| |/ /
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| | | |
| | | | |
Remove most code related to serialized properties
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Nearly completely implemented in terms of custom properties.
`_before_type_cast` now stores the raw serialized string consistently,
which removes the need to keep track of "state". The following is now
consistently true:
- `model.serialized == model.reload.serialized`
- A model can be dumped and loaded infinitely without changing
- A model can be saved and reloaded infinitely without changing
|
|\ \ \
| | | |
| | | | |
Don't change values in `@raw_attributes` during serialization
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
During `init_with`, the attributes given to the coder will be placed
into `@raw_attributes`. As such, we should read from `@raw_attributes`
when encoding, rather than `@attributes`, which has been type cast.
|
|\ \ \ \
| | | | |
| | | | | |
Swallow bundler exceptions when running tests
|
| | | | |
| | | | |
| | | | |
| | | | | |
Let's avoid useless output when testing stuff related to Bundler.
|
|\ \ \ \ \ |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
config.assets.digests -> config.assets.digest
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
in Asset Pipeline guide.
[skip ci]
|
| | | | |
| | | | |
| | | | |
| | | | | |
be published and requires more attention. [ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[ci skip] correct doc for ActionView::Helpers::DebugHelper
|