`within_new_transaction` is delegated to the transaction manager. Let's remove
this explicit receiver to honor the delegation and for consistency with usage
of the also delegated `current_transaction`.
One is the alias of the other, and have been so for a very long time.
My issue with this is that `klass` is really a bad name, and it's
very confusing when reading code to see a mix of both names being
used.
There is no point officially deprecating either, but inside
Active Record we should consistently only use one, I chose to
use `model` as it's way more descriptive in my opinion.
In https://github.com/rails/rails/pull/50395 I noticed lots of
methods are delegated from `Relation` to the model. The intent of
this code is to allow using use defined class methods like scopes.
But because of this autmated delegation it allows calling any
`ActiveRecord::Base` class method on a `Relation`, which in itself
may be desireable, however we very wastefully define the delegator
on the first call, and worse we wrap it with a global scope setter.
This also has led to bugs in the past, like https://github.com/rails/rails/pull/51776
So I think we should be more strict about it.
We can't deprecate this behavior because gems might depend on it, however we
can ban it from Active Record's own test suite to avoid regressions.
* Change asset pipeline default to Propshaft
* Use :all for stylesheets when propshaft is active
* Switch to using propshaft as the default (still need to find a way to tests against sprockets too)
* Fix tests that rely on sprockets being used
* Fix Propshaft tests (#51913)
* Update railties/test/generators/shared_generator_tests.rb
Co-authored-by: Lázaro Nixon <lazaronixon@hotmail.com>
---------
Co-authored-by: Lázaro Nixon <lazaronixon@hotmail.com>
Or rather, what they could mean. What to do with priority numbers is up to the adapter implementation.
All adapters that support priority that I know of treat lower priority as more urgent:
* Backburner
* Delayed Job
* Que
* SolidQueue
* GoodJob (in v4)
Add tests to verify the app and helpers files deprecation / backwards
compatibility, and remove the `.rb` extension from the message, since we
generally require without them.
It looks like `preview_image_needed_before_processing_variants?` was added recently,
but it's stated as being public API.
However, it looks like it's more of an implementation detail that's not meant for Active Storage users.
So this marks it as nodoc, so we're not on the hook for maintaining it.
This reverts commit e97db3b3957781c781a61fb01265feb2b57688bb, reversing
changes made to a27a1751cfd499f69499e943f12e3400b55a323e.
This is breaking application routes when running without eager load enabled.
Follow up to #51891
This resolves the following test failure:
https://buildkite.com/rails/rails/builds/107520#018fa76e-0408-4630-a75d-eac5caa16463/1199-1209
```
Failure:
ApplicationTests::ConfigurationTest#test_SQLite3Adapter.strict_strings_by_default_can_be_configured_via_config.active_record.sqlite3_adapter_strict_strings_by_default_in_an_initializer [test/application/configuration_test.rb:2896]:
Expected /no such column: non_existent/ to match "SQLite3::SQLException: no such column: \"non_existent\" - should this be a string literal in single-quotes?".
```
Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>