Commit Graph

9004 Commits

Author SHA1 Message Date
Matthieu Prat 070487e09e
Fix a couple of typos [ci skip] 2023-12-31 12:28:30 +01:00
Jean Boussier 1320ff0a3e
Merge pull request #2 from zzak/bump-ruby-version_check
Remove Ruby version check
2023-12-31 09:04:16 +01:00
Akhil G Krishnan 2fdec81990 Document .rubocop.yml in rails default file folder structure
review changes updated
2023-12-31 11:31:30 +05:30
zzak 110a4e6abc
Remove Ruby version check
Also includes relevant docs, inspired by 6487836af8
2023-12-31 12:38:25 +09:00
Akhil G Krishnan a0e2c79e74 Document --skip-rubocop rails command 2023-12-31 08:20:01 +05:30
Hartley McGuire 590a675c4e
Merge pull request #50485 from hexdevs/ta/fix-fedora-instructions
docs: fix ImageMagick package name on fedora [ci-skip]
2023-12-29 17:55:40 -05:00
Thiago Araujo dcdd1ef7c2 docs: fix ImageMagick package name on fedora [ci-skip]
this commit corrects the name of the ImageMagick package
on fedora (from `imagemagick` to `ImageMagick`).

ref: https://packages.fedoraproject.org/pkgs/ImageMagick/ImageMagick/
2023-12-29 14:14:15 -07:00
Gareth Jones e76c52a939
docs: update reference to `main` branch 2023-12-30 09:37:55 +13:00
Petrik de Heus e7f2db67ca
Merge pull request #50423 from p8/guides/link-to-query-matchers
Link to query assertions in testing guide [ci-skip]
2023-12-27 23:34:00 +01:00
zzak 16ff9afb2e
Merge pull request #50275 from seanpdoyle/polymorphic-rename
Provide guidance for renaming classes in polymorphic associations [ci skip]
2023-12-25 08:01:15 +09:00
Petrik 557dacfff9 Link to query assertions in testing guide [ci-skip]
We can link to the recenlty added queries as edge guides link to edge
API docs.
For readability the links are extracted.
2023-12-21 18:05:19 +01:00
fatkodima f48bbff32c Expose `assert_queries_match` and `assert_no_queries_match` assertions 2023-12-21 01:30:16 +02:00
Jonathan Hefner b0048c787a Capitalize "Rails" [ci-skip] 2023-12-19 13:16:47 -06:00
Hartley McGuire 1247932c80
Merge pull request #50360 from skipkayhil/hm-docs-deprecations
Improve Deprecation API docs and guide [ci-skip]
2023-12-17 17:10:21 -05:00
fatkodima a69228efa4 Fix `guides/active_record_migrations.rb` template to use the current migrations version 2023-12-17 11:36:10 +02:00
Hartley McGuire c7ff8b975b
Add sqlite3 back to bug templates that need it
The sqlite3 gem was removed during the merging of main and gem
templates, but the resulting templates still depend on it.
2023-12-17 00:10:22 -05:00
Sean Doyle fe2632f340 Add `actionview` bug report template
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.
2023-12-16 10:16:10 -05:00
Jean Boussier 860ab28ff5
Merge pull request #50317 from zzak/consolidate-bug_reports
Consolidate bug_report_templates and remove the gem versions
2023-12-16 13:55:26 +01:00
Mike Kasberg 6fda7ade58 Document `action_mailer.file_settings` [ci-skip]
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)
2023-12-15 08:31:07 -07:00
Hartley McGuire f93eb16564
Improve Deprecation API docs and guide
- 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.
2023-12-14 17:10:44 -05:00
Emmanuel Hayford 03f2b75417 Document assert_queries and assert_no_queries [ci-skip] 2023-12-14 15:10:53 +01:00
Eugene Kenny 8278626a2c
Merge pull request #49297 from hannahramadan/main
Add instrumentation for ActionController::Live#send_stream
2023-12-13 08:38:59 +00:00
hramadan 6488bd9ec0 Add instrumentation for ActionController::Live#send_stream
Allows subscribing to `send_stream` events.
The event payload contains the filename, disposition, and type.
2023-12-13 08:19:48 +00:00
notapatch cfdf868f92 Update Rack::Head documentation to match code behavior
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.
2023-12-12 21:08:56 +00:00
Hartley McGuire 5316432444
Merge pull request #50335 from takmar/fix-engines-documentation
[ci skip] Update outdated documentation for Engines
2023-12-12 00:02:14 -05:00
takmar ea49d27111 Update outdated documentation for Engines 2023-12-12 13:05:55 +09:00
Hartley McGuire b41aafee6c
Document :request in start_processing's payload 2023-12-11 19:05:33 -05:00
zzak b380da71b0
Consolidate bug_report_templates and remove the gem versions
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.
2023-12-12 07:06:29 +09:00
Ricardo Elisiário f9e21c5616
refactor: fix typo 2023-12-11 19:53:39 +00:00
Aaron Patterson 759ae9052c
Merge pull request #49472 from mateusdeap/main
[ci skip] Change `resourceful` to `resource` for clarity
2023-12-11 09:04:27 -08:00
r7kamura f06189862d Fix wrong example code: `active_job.message_serializer` 2023-12-11 14:11:29 +09:00
jbk2 3da041ef52
Correct HAVING conditions active_record example query
Correct the active_record query example, in the HAVING conditions section, to align with the corresponding given SQL output.
2023-12-08 17:26:59 +01:00
Sean Doyle 0d8b3f09af Provide guidance for renaming classes in polymorphic associations [ci skip]
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>
2023-12-08 09:19:21 -05:00
Hartley McGuire f0d66d6c47
Merge pull request #50279 from skipkayhil/hm-nfd-2
More improvements to new framework defaults doc [ci-skip]
2023-12-07 17:37:00 -05:00
Jean Boussier 745992e93e
Merge pull request #49640 from mguan2020/branch_new
Added link further explaining ERB in the 'Getting Started' documentation [ci skip]
2023-12-07 08:02:38 +01:00
Hartley McGuire d3d327bb43
More improvements to new framework defaults doc
- 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
2023-12-05 19:08:54 -05:00
Hartley McGuire c057edaaad
Merge pull request #50277 from skipkayhil/hm-nfd-open-redirects
Improve doc for raise_on_open_redirects [ci-skip]
2023-12-05 17:38:31 -05:00
Hartley McGuire 8f1b3ceb7e
Fix link to config.active_record.protocol_adapters 2023-12-05 17:15:17 -05:00
Hartley McGuire ecbe5f9bfe
Improve doc for raise_on_open_redirects
- provide a definition for an "open redirect"
- clarify what "permitted open redirect" means in this context
2023-12-05 17:10:55 -05:00
Akhil G Krishnan cc55785f4d Add actionview deprecation to 7.2 release note 2023-12-04 22:41:10 +05:30
Jean Boussier a35ceb429c
Merge pull request #50262 from Techbrunch/patch-1
Use RedCloth GitHub instead of an expired domain
2023-12-04 16:52:58 +01:00
Jean Boussier 439e8be98e
Merge pull request #50217 from fastjames/document_variant_preprocessed_option
Document the `preprocessed` variant option [ci skip]
2023-12-04 16:49:05 +01:00
Jim Kane 87c614a1d4 Document the `preprocessed` variant option 2023-12-04 09:21:01 -06:00
Techbrunch a86e8c875a
Use RedCloth GitHub instead of an expired domain 2023-12-04 14:44:30 +01:00
yysaki 7f94cb9483 Update security.md typo about HTTP Strict-Transport-Security [ci-skip] 2023-12-02 17:23:23 +09:00
Adrianna Chang 2854e378c8
Revert "Add config for validating migration timestamps" 2023-12-01 11:58:53 -05:00
Eileen M. Uchitelle c60d064fd5
Merge pull request #50205 from rails/ac-validate-migration-timestamps
Add config for validating migration timestamps
2023-11-30 16:20:49 -05:00
Adrianna Chang 06575d1d75
Add `active_record.config.validate_migration_timestamps` option.
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.
2023-11-30 16:04:06 -05:00
Jean Boussier da2dbbb292
Merge pull request #50157 from Earlopain/update-erb-trim-mode-docs
Update docs for `erb_trim_mode`
2023-11-30 19:15:43 +01:00
Jean Boussier 9c22f35440
Merge pull request #50140 from kmcphillips/ar-protocol-adapter
Add a `ActiveRecord.protocol_adapters` configuration to map `DATABASE_URL` protocols to adapters at an application level
2023-11-29 17:41:51 +01:00