| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Add missing `+` around a some literals.
|
| |
| |
| |
| |
| |
| | |
Mainly around `nil`
[ci skip]
|
| | |
|
| |
| |
| |
| |
| | |
This alternative case expressions read better for my taste, and look more uniform
in a file where other similar case expressions are used (without dynamic clauses).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current implementation of AC::Parameters#permit builds permitted hashes and
then calls permit! on them.
This filtering is recursive, so we call permit! on terminal branches, but then
ascendants call permit! on themselves when the recursion goes up the stack,
which recurses all the way down again because permit! is recursive itself.
Repeat this for every parent node and you get some scary O-something going on
that I don't even want to compute.
Instead, since the whole point of the permit recursion is to build permitted
hashes along the way and at that point you know you've just come up with a
valid filtered version, you can already switch the toggle on the spot.
I have seen 2x speedups in casual benchmarks with small structures. As the
previous description shows, the difference in performance is going to be a
function of the nesting.
Note that that the involved methods are private and used only by permit.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
add `ActionController::Parameters#merge!`
|
| |/
| |
| |
| |
| | |
This method has the same behavior as `Hash#merge!`, returns current
`ActionController::Parameters`.
|
| | |
|
|/
|
|
| |
Follow up to 333bfd896e87862cece95deb1ef88132d5f54ba8
|
|
|
|
|
|
|
|
|
|
|
| |
* ActionController::Parameters#deep_dup
* Tests for ActionController::Parameters#deep_dup
* Fix test for ActionController::Parameters#deep_dup
* More tests for ActionController::Parameters#deep_dup
[Rafael Mendonça França + Pavel Evstigneev]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The class-level respond_to was extracted in ee77770 to responders gem
[ci skip]
|
|
|
| |
The default Content-Type is `text/html`, not `text/plain`.
|
|
|
|
|
|
| |
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
|
|\
| |
| | |
call `.to_h` to avoid using deprecated method
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`ActionController::Parameters#merge` call `HashWithIndifferentAccess#merge`.
In addition, it calls `HashWithIndifferentAccess#update` from
`HashWithIndifferentAccess#merge`, where it is called the `#to_hash` of argument.
But `ActionController::Parameters#to_hash` is deprecated, warning message is
displayed.
To avoid this, modify to convert object to `Hash`.
Fixes #26415
|
|\ \
| |/
|/| |
Clarify expires_now documentation
|
| |
| |
| |
| | |
[ci skip]
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Makes it clearer why we're doing this
Add a comment to elaborate on what the undef means and move it closer
to the deprecations so it's less likely for whoever pulls the
deprecations that it should go too.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Removed my patch in favor of @tenderlove's less invasive approach.
[Aaron Patterson & Jon Moss]
|
| | |
|
| |
| |
| | |
Include the content of the flash in the auto-generated etag
|
|\ \
| | |
| | | |
Show unpermitted parameters as symbols in logs (so they could be copy…
|
| | |
| | |
| | |
| | | |
to the code)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| | |
| | |
| | |
| | | |
after writing to the stream.
|
| | | |
|
| | |
| | |
| | |
| | | |
They are not part of the public API
|
| | | |
|
|/ /
| |
| |
| |
| | |
At GitHub we need to handle parameter encodings that are not UTF-8. This
patch allows us to specify encodings per parameter per action.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A few have been left for aesthetic reasons, but have made a pass
and removed most of them.
Note that if the method `foo` returns an array, `foo << 1`
is a regular push, nothing to do with assignments, so
no self required.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| | |
Looked odd, so completely detached from the other necessary part of
the implementation.
|
| |
| |
| |
| |
| |
| | |
The coder that Psych passes in has a `tag` method we can use to detect
which serialization format we're reviving for. Use it and make it clearer
alongside the `load_tags` fiddling.
|