| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rails 6.0 will support Ruby 2.4.1 or higher
`# frozen_string_literal: true` magic comment is enough to make string object frozen.
This magic comment is enabled by `Style/FrozenStringLiteralComment` cop.
* Exclude these files not to auto correct false positive `Regexp#freeze`
- 'actionpack/lib/action_dispatch/journey/router/utils.rb'
- 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb'
It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333
Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed.
* Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required
- 'actionpack/test/controller/test_case_test.rb'
- 'activemodel/test/cases/type/string_test.rb'
- 'activesupport/lib/active_support/core_ext/string/strip.rb'
- 'activesupport/test/core_ext/string_ext_test.rb'
- 'railties/test/generators/actions_test.rb'
|
|
|
|
|
| |
This commit fixes all references in the codebase missing a trailing :,
which causes the nodoc not to actually work :) [skip ci]
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Mainly around `nil`
[ci skip]
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
| |
In #18721 we removed the discard key from the session hash used to flash
messages and that broke compatibility with Rails 4 applications because they
try to map in the discarded flash messages and it returns nil.
Fixes #24726.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to that `ActionDispatch::Flash` (the flash API's middleware) is not
included for API controllers, the `request.reset_session` method, which
relies on there being a `flash=` method which is in fact defined by the
middleware, was previously breaking. Similarly to how
add46482a540b33184f3011c5c307f4b8e90c9cc created a method to be
overridden by the flash middleware in order to ensure non-breakage, this
is how flashes are now reset.
Fixes #24222
|
|
|
|
|
|
| |
We only want to activate flash when the user has enabled it. Api
servers don't use flash, so add an empty implementation to the base
Request object.
|
|
|
|
|
| |
Committing the flash needs to happen in order for the session to be
written correctly, so lets guarantee that it actually does happen.
|
|
|
|
|
| |
I'm doing this so that we can commit the flash to the session object Out
of Band of the flash middleware
|
|
|
|
|
| |
The flash middleware shouldn't know how to look up the session object.
Just ask the request for that information.
|
|
|
|
|
|
| |
Just include the modules necessary in the Request object to implement
the things we need. This should make it easier to build delegate
request objects because the API is smaller
|
|
|
|
|
| |
try to remove dependencies on `@env` so we can have more flexible
internals
|
|
|
|
|
| |
This commit allows us to use one request object rather than allocating
multiple request objects to deal with the session.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #17586
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Stringify the incoming as well to handle incoming symbol keys from
marshalled sessions
|
| |
|
|
|
|
| |
c43ca06ca091fc09e2c86bb051ac92b648f12b64
|
|
|
|
|
|
|
| |
The nested `if` was replaced by using `presence` which takes account for
the given hash when it is `nil` or when it is empty. The `else` was
removed because what it was doing was to assign to `env[KEY]` the
value it already had.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 90c887fa7d0c454b7533e208daefc342dea4d5f3.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with unstable class names and instance variables.
Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.
Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.
Remove blank lines I introduced in controller/test_case.rb.
Unit tests for FlashHash#to_session_value.
Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.
Test that Rails 3.2 session flashes are correctly converted to the new format.
Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.
Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Remove a couple of unused ivars left from previous refactoring
|
| |
| |
| |
| | |
These ivars were missed in d142572567 when close checks were removed
|
|/
|
|
| |
dangerous especially with Rack::Cache), it should only be loaded when the flash method is called
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
is one benefit of choosing composition over inheritance.
|
| |
|