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)
- Link to Deprecation::Behavior in configuring guide
The current list of options for `config.active_support.deprecation`
was missing the newly added `:report` option. Instead of adding the
missing option and continuing to keep 4 different lists of the same
options in sync, I opted to replace the list with a link to the
options in the Behavior API docs. This had the additional advantage of
giving more information about all of the options which was not
mentioned in the Configuring guide.
- Use symbols for Behavior options
It felt to me like naming the options did not make it explicit that
those were the symbols to pass to `#behavior=`, but by adding the `:`
that becomes more clear.
- Add some API links
There were a few references to `behavior=`, but we may as well link to
the actual method.
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.
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.
Add guidance to the Association Basics and `.belongs_to` method
documentation to encourage the renaming of a model's Ruby class to
coincide with updates to the existing data in the database.
Since Action Text and Active Storage rely on polymorphic associations,
add similar warnings to their guides.
Co-authored-by: Petrik de Heus <petrik@deheus.net>
Co-authored-by: Stephen Hanson <s.hanson5@gmail.com>
Co-authored-by: zzak <zzakscott@gmail.com>
- Explain the purpose of wrap_parameters_by_default and how it replaces
the wrap_parameters initializer.
- Explain why action_mailer.smtp_timeout exists and why its useful
- Add example to action_view.button_to_generates_button_tag
When set, validates that the timestamp prefix for a migration is in the form YYYYMMDDHHMMSS.
This is designed to prevent migration timestamps from being modified by hand.
It is turned off by default.