Commit Graph

8832 Commits

Author SHA1 Message Date
Akhil G Krishnan
cf61804fd4 Update postgres naming to PostgreSQL 2023-10-11 09:18:36 +05:30
hachi8833
4d4f80d2c1 Update raise_on_open_redirects config with table style 2023-10-10 19:38:10 +09:00
hachi8833
8763271aef Add raise_on_missing_callback_actions to configuring guide 2023-10-10 11:22:10 +09:00
Xavier Noria
785b2c29cd Fix example in Active Storage guide
url_for returns a URL, not a path. Also, as the text says,
that URL points to the redirect controller, the "/redirect"
segment was missing.
2023-10-09 17:17:28 +02:00
Akhil G Krishnan
73b2ae04fe Point to Guide instead of edge [skip ci] 2023-10-09 19:58:56 +05:30
Carlos Antonio da Silva
e3e0c646ab Point to API docs instead of edge [ci skip] 2023-10-09 10:19:38 -03:00
Hartley McGuire
ce86940744
Update gem bug report templates to 7.1 2023-10-07 20:49:14 -04:00
fatkodima
961fc42f90
Merge pull request #49533 from akhilgkrishnan/release-note-typo-fix
Typo: Updated the rails version in rails 7.2 release note [skip ci]
2023-10-07 21:22:05 +03:00
Akhil G Krishnan
6df831a5c6 Typo: Updated the rails version in rails 7.2 release note [skip ci] 2023-10-07 23:12:40 +05:30
Jonathan Hefner
ff191cebe5 Simplify up / down migration example [ci-skip]
Follow-up to #47782.

These examples merely illustrate the order of execution when using `up`
and `down`, so we only need one operation before and after.
2023-10-07 12:26:26 -05:00
Jonathan Hefner
400d9d498b Add missing caveats for migration #change actions [ci-skip] 2023-10-07 12:26:26 -05:00
Jonathan Hefner
a89412b362 Remove redundant caveat for remove_column [ci-skip] 2023-10-07 12:26:26 -05:00
Jonathan Hefner
8d0748e6b0 Rewrite Testing Jobs section [ci-skip]
This simplifies the prose and code examples, and links to more API docs.
2023-10-07 12:26:26 -05:00
Jonathan Hefner
ed08eea99f Capitalize framework names [ci-skip] 2023-10-07 12:26:26 -05:00
Jonathan Hefner
4c2fdbfac5 Move Server Timing info to Configuration guide [ci-skip]
Follow-up to #48221.

The Active Support Instrumentation guide is about the
`ActiveSupport::Notifications` API.  Therefore, move the information
about `config.server_timing` and the `ActionDispatch::ServerTiming`
middleware to the existing sections in the Configuration guide.
2023-10-07 12:26:21 -05:00
Jonathan Hefner
6df4d3b6ff Fix punctuation and formatting [ci-skip] 2023-10-07 12:02:23 -05:00
Jonathan Hefner
9418b34e7d Reword "Regarding the Rails Stack" section [ci-skip] 2023-10-07 12:02:23 -05:00
Jonathan Hefner
ce019f1241 Reword "Method Visibility" section [ci-skip]
For clarity and brevity.
2023-10-07 12:02:23 -05:00
Jonathan Hefner
eabc003f8e Link to api.rubyonrails.org instead of edgeapi [ci-skip] 2023-10-07 12:02:22 -05:00
Jonathan Hefner
76ef648858 Rewrap documentation example for legibility [ci-skip] 2023-10-07 12:02:22 -05:00
Jonathan Hefner
0e908bb5ef Use ruby code fence [ci-skip]
These examples show RDoc in the form of Ruby comments, and should
therefore use the `ruby` code fence (which matches the other examples in
this guide).
2023-10-07 12:02:22 -05:00
Jonathan Hefner
8447a72948 Convert examples from Markdown to RDoc [ci-skip]
This guide is about API documentation which uses RDoc, so we should
avoid Markdown syntax in examples.
2023-10-07 12:02:22 -05:00
Jonathan Hefner
e8166c4c70 Hyphenate "database specific" [ci-skip]
"database-specific" is a compound adjective, and thus hyphenated.
2023-10-07 12:02:22 -05:00
Jonathan Hefner
29b32216ff Link to ActionDispatch::DebugExceptions API doc [ci-skip]
This also adds missing punctuation and formatting.
2023-10-07 11:55:35 -05:00
Jonathan Hefner
3534c40c33 Move example to API docs [ci-skip] 2023-10-07 11:55:34 -05:00
Jonathan Hefner
d81019eb40 Link to API docs [ci-skip] 2023-10-07 11:52:34 -05:00
Edouard CHIN
8be0c10c48 Add doc to explain how to migrate to the new BroadcastLogger:
- This should make it easier for apps or libraries that were
  previously relying on the private API.
  Also took the opportunity to tweak the doc of the BroadcastLogger
  to mention what happens when calling a non-standard method.

  Fix #49494
2023-10-07 14:43:46 +02:00
hachi8833
232f237589 Update changelog links to 7-1-stable 2023-10-06 18:05:21 +09:00
Rafael Mendonça França
2d271a4b90
Merge pull request #49491 from tnir/tn-date-rails71
Add corrected release month for Rails 7.1
2023-10-05 08:01:36 +00:00
Rafael Mendonça França
2974362b3f
Add release month for Rails 7.1
We know we are going to release this month.
2023-10-05 07:59:58 +00:00
hachi8833
9c421dde8c Fix heading in migration guide 2023-10-04 20:20:10 +09:00
hachi8833
ffee8a0aa2 Add description for db:prepare
Review by ChatGPT

Minor fix on db:prepare document

Update by review

Add hard wrap
2023-10-04 19:04:09 +09:00
Sean Doyle
bff95987ef Resolve Upgrading Rails lint violation
Follow-up to [#49474][]

Execute documentation change in CI so that the linters can scan the
documentation's code blocks.

[#49474]: https://github.com/rails/rails/pull/49474#issuecomment-1745519821
2023-10-03 14:42:13 -04:00
Petrik de Heus
d7e401d752
Merge pull request #49474 from seanpdoyle/upgrading-action-view-rendered
Document how to upgrade to `ActionView::TestCase#rendered` [ci skip]
2023-10-03 20:20:27 +02:00
Sean Doyle
5243fd302b Document how to upgrade to ActionView::TestCase#rendered [ci skip]
Based on a [comment on #49194][], describe how to achieve backwards
compatibility with existing `ActionView::TestCase` definitions.

[comment on #49194]: https://github.com/rails/rails/pull/49194#discussion_r1337832295
2023-10-03 13:43:11 -04:00
Steve Polito
96a9570a26 Update links in Generator Guides
Link to `Rails::Generators::Testing::Behavior` instead of
`Rails::Generators::Testing::Behaviour` in an effort to ensure the Edge
Guides link to the correct API documentation.
2023-10-03 09:27:33 -04:00
Steve Polito
e659f46da1
Conditionally print $stdout when invoking run_generator (#49448)
* Conditionally print `$stdout` when invoking `run_generator`

In an effort to improve the developer experience when debugging
generator tests, we add the ability to conditionally print `$stdout`
instead of capturing it.

This allows for calls to `binding.irb` and `puts` work as expected.

```sh
PRINT_STDOUT=true ./bin/test test/generators/actions_test.rb
```

* Update railties/CHANGELOG.md

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>

* Rename environment variable

* Update generators guides.

* Update guides

---------

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
2023-10-03 07:01:16 -04:00
Shozo Hatta
b10a2e4943
[ci-skip][Docs]Add encryption.add_to_filter_parameters to configuring.md (#49443)
* Add encryption.add_to_filter_parameters to configuring.md

encryption.add_to_filter_paramters has been merged by https://github.com/rails/rails/pull/46453.

(This PR is a second try of https://github.com/rails/rails/pull/49364 )

* Update entry for encryption.add_to_filter_parameters

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2023-10-02 06:39:40 -04:00
Rafael Mendonça França
a5f113f433
Merge pull request #49423 from paulreece/update_has_one_doc
Added available methods for has_one association to guide.
2023-09-29 16:24:07 -04:00
Rafael Mendonça França
db2ef1d250
Merge pull request #49417 from Edouard-chin/ec-logger-fix
Fix the BroadcastLogger being initialized too late:
2023-09-29 15:45:03 -04:00
Rafael Mendonça França
098eea5be0
Merge pull request #49433 from bdewater/as-notifications-events
Stop building AS::Notifications::Event manually
2023-09-29 14:40:04 -04:00
Rafael Mendonça França
00dd041192
Those features are not merged yet 2023-09-29 18:29:53 +00:00
Bart de Water
95b6fbd00f Stop building AS::Notifications::Event manually
It's possible since Rails 6 (3ea2857943dc294d7809930b4cc5b318b9c39577) to let the framework create Event objects, but the guides and docs weren't updated to lead with this example.

Manually instantiating an Event doesn't record CPU time and allocations, I've seen it more than once that people copy-pasting the example code get confused about these stats returning 0. The tests here show that - just like the apps I've worked on - the old pattern keeps getting copy-pasted.
2023-09-29 12:34:23 -04:00
Edouard CHIN
40cb50e06e Fix the BroadcastLogger being initialized too late:
- An oversight of #48615 is that it changes the `Rails.logger` to be
  a broadcast logger after the app is booted. Anything referencing
  `Rails.logger` during the boot process will get a simple logger and
  ultimately resulting in logs not being broadcasted.

  For example `ActionController::Base.logger.info("abc")` would
  just output logs in the `development.log` file, not on STDOUT.

  ----

  The only solution I could think of is to create a BroadcastLogger
  earlier at boot, and add logger to that broadcast when needed (instead
  of modiyfing the `Rails.logger` variable).
2023-09-29 15:42:47 +02:00
hachi8833
d41a5dad9a Add assert_error_reported and assert_no_error_reported to testing.md
See #46029.
2023-09-29 19:37:47 +09:00
Earlopain
f3e0a72801
Fix formatting of two configs in configuration guide 2023-09-29 11:32:41 +02:00
paulreece
519558108e This adds the following methods to the definition of available methods in the guide:
belongs_to - foreign_type, :required, :default, :strict_loading, and :ensuring_owner_was .
has_one - :required, :disable_joins, :strict_loading, :query_constraints, and :ensuring_owner_was .
has_many - :disable_joins, :ensuring_owner_was, :extend, :foreign_type, :query_constraints, :strict_loading
has_and_belongs_to_many - :strict_loading .
2023-09-28 21:20:44 -04:00
Hartley McGuire
b4d8603bd3
Merge pull request #49418 from akhilgkrishnan/html-to-erb
Fix the wrong markdown highlighting [skip ci]
2023-09-28 13:26:44 -04:00
Rafael Mendonça França
02313b836e
Merge pull request #49412 from fatkodima/fix-multiple-dbs-example
Enable raising when running `rubocop-md` against invalid ruby snippets
2023-09-28 11:54:39 -04:00
Akhil G Krishnan
2e35046f61 Fix the wrong markdown hightlighting [skip ci] 2023-09-28 20:14:35 +05:30