The changes to 860ab28ff5 have merged the bug report templates into one.
Since the template for the main branch has been removed, the link that was previously in CONTRIBUTING.md is invalid.
So I replaced them with the changed links.
Introduce Action View bug report template for contributors to reproduce
issues with failing `ActionView::TestCase` instances.
In addition to rendering ERB with the `inline:` keyword, the sample
tests also include a `Helpers` module to demonstrate how to incorporate
view helpers into the reproduction script.
I was reading the Action Mailer guide and noticed the settings and
defaults for the `:file` delivery method were poorly documented. These
docs were originally added back in #13728. #44422 added links to the
relevant sections of the Configuration guide, but did not link
`config.action_mailer.file_settings` because the Configuration guide is
actually missing that section.
I added a short section to the Configuration guide for
`config.action_mailer.file_settings` and linked to it from the Action
Mailer guide, following the style of the other delivery methods. Like
other delivery methods, the relevant options for `file_settings` come
from the allowed options of the `Mail::FileDelivery` class in the mail
gem.
Here's where Rails sets up this delivery method with the default
location:
9064735ec5/actionmailer/lib/action_mailer/delivery_methods.rb (L30-L31)
And here's where the mail gem uses the options:
10a4443b9d/lib/mail/network/delivery_methods/file_delivery.rb (L21)
Generated columns (both stored and dynamic) are supported since version 3.31.0 of SQLite.
This adds support for those to the SQLite3 adapter.
```ruby
create_table :users do |t|
t.string :name
t.virtual :name_upper, type: :string, as: 'UPPER(name)'
t.virtual :name_lower, type: :string, as: 'LOWER(name)', stored: true
end
```
Follow-up to #50281
I think `assert_queries` and `assert_no_queries` are so useful that I
want to read the documentation for the assertions. This patch adds the
doc for them and updated the test case named `test_assert_queries` to
verify `:matcher` works as expected.
I also changed `assert_queries` to make sure the subscriber of
`"sql.active_record"` is unsubscribed without affecting other test
cases. Without this change, some test cases fail because of execution of
`String#match`, which may cause `ArgumentError: invalid byte sequence in UTF-8`.
When preloading a has_many association, we were simply concatenating
the preloaded records without regard to whether they were already
loaded on the owner. Even though there is a check for `loaded?` in this
part of the preloader, some persisted records may not be marked as such.
For example, if a record is created via `owner.association.create`. This
change reverts to the previous behavior of replacing the target
association while also preserving non-persisted records, which was the
goal of https://github.com/rails/rails/pull/50129.
Co-authored-by: John Hawthorn <john@hawthorn.email>
Contrary to mysql2, trilogy will ignore the `socket` config
if `host` is set.
This makes it impossible to configure a UNIX domain socket connection
via `DATABASE_URL`, as the URL must include a host.
In commit 449039a86d,
ActionDispatch::Head was replaced with Rack::Head in the
middleware. However, the documentation was not changed.
Rack::Head code behaviour is not to change HEAD into GET it is to
close the body of all HEAD requests. This commit fixes the docs
to show this.
The left-over ActionDisplayt::Head documentation is,
unsurprisingly, wrong. Rack::Head code behaviour is not to change
HEAD into GET it is to close the body of all HEAD requests.
This commit fixes the docs to show this.
This commit addresses the Rails CI using Ruby master branch failure
because Rails CI enables `RAILS_STRICT_WARNINGS` to raise RuntimeError for warnings.
https://buildkite.com/rails/rails/builds/102621#018c49df-e3de-4c2f-aeb7-6d8f08997da9/1102-1107
```ruby
/rails/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb:4: warning: bigdecimal/util is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. (RuntimeError)
```
According to https://bugs.ruby-lang.org/issues/20058 ,
This failure has been triggered since cc9826503d
and it will be addressed once the bigdecimal 3.1.5 is available at rubygems.org .
In the meantime, we can workaround this issue by logking `bigdecimal` version to 3.1.4 or lower.
This commit should be reverted when the `bigdecimal` 3.1.5 is available at rubygems.org .
As a contributor, changing a single line to test the desired version does not warrant a separate file for each type of report.
The only argument I can see for keeping the gem versions is that users are likely reporting a bug for a specific version of Rails, typically during an upgrade. As few people are probably testing their applications against Rails main branch.
Additionally, having the gem version templates means that we are testing both main and a stable release of Rails in CI, which has some benefit.
By removing the edge version templates, we also lose that coverage in CI, but I think it's something we can fix in buildkite-config to replace the line in those guides before running them later.
IMO, the cost of separate files and the confusion it will create if we want to add more templates outweighs the benefits mentioned here.
My motivation is that I want to add more report templates, like for additional adapters, and this list will grow to be unmanageable if we keep the gem versions.