<!–
Thanks for contributing to Rails!
Please do not make Draft pull requests, as they still send
notifications to everyone watching the Rails repo.
Create a pull request when it is ready for review and feedback
from the Rails…
<!–
Thanks for contributing to Rails!
Please do not make Draft pull requests, as they still send
notifications to everyone watching the Rails repo.
Create a pull request when it is ready for review and feedback
from the Rails…
This Pull Request has been created to fix a bug introduced by https://github.com/rails/rails/pull/50129
We noticed a bug with how records were being preloaded on main. If a record had persisted records…
https://guides.rubyonrails.org/ still provides mobi format for Kindle platform. But mobi format is already EOL in Dec, 2022.
We should backport https://github.com/rails/rails/pull/45539 to …
Option silence_disabled_session_errors was removed in 4e3504f thus
setting it results in Invalid option key runtime error.
ActiveRecord::Base.connection.truncate for SQLite3 adapter.TRUNCATE TABLE, but SQLite3 adapter can supportActiveRecord::Base.connection.truncate by using DELETE FROM.DELETE without…It should make the test more readable since flunk emphasizes better
than yield that the block shouldn't be called.
Also, it improves error message:
(snip)
should not call this block
(snip)
(snip)
[ArgumentEr...
String#to_d does not raise an exception if an invalid value is specified.
So can remove exception handling.
$ bundle exec ruby -v -rbigdecimal -rbigdecimal/util -e 'p "123,003".to_d'
ruby 2.6.0dev (2018-12-21 trunk 66474) [x8...
Despite parallelize method without arguments makes the same things
as parallelize(workers: :number_of_processors, with: :processes)
we can set extended form of it by default in test/test_helper.rb
for newly generated rails apps….
Also, use the physical core count of the machine as
the default number of workers by generating the test_helper.rb file
with parallelize(workers: :number_of_processors
Closes #34734
Extend documentation of ActiveSupport::Notifications.subscribe
Add mention that a block with only one argument passed to the method
will yield an event object.
Emphasize that SubscribeEventObjects is a test class by ad…
This PR:
#create_or_find_by/! methodscreate_or_find_by. This method uses find_by! internally instead of find_byBefore #33325, deprecate works for non-exist methods.
This is necessary, for example, if want to deprecate dynamically defined
methods like attributes methods.
Fixes #34646
Hello,
I've found a few places in Rails code base where I think it makes sense to calculate elapsed time more precisely by using Process.clock_gettime(Process::CLOCK_MONOTONIC):
ActiveSupport::Cache::MemoryStore#pruneparallelize_teardown is executed for each processRefactor some things to easily support platforms like windows
https://github.com/rails/rails/pull/34618#issuecomment-444330057
For pass Active Job integration tests with Ruby 2.5.
Ref: https://github.com/collectiveidea/delayed_job/pull/996
Followup to https://github.com/rails/rails/pull/29263.
Enabling this option in new_framework_defaults_5_2.rb didn't work before, as railtie initializers run before application initializers.
Using respond_to? to decide whether t…
Bundler 1.16.1 fixed https://github.com/bundler/bundler/issues/6072.
I believe RubyGems 2.6 and Bundler 1.16.1 works fine with Rails master.
ActiveStorage::Variant is resolved on routing. So I've removed url_for from a document of ActiveStorage::Variant.