Commit Graph

7881 Commits

Author SHA1 Message Date
Jonathan Hefner
8ace32c4cc
Merge pull request #44911 from pocke/Remove_unnecessary_note_for_primary_key_in_the_guide
Remove unnecessary note for primary_key in the guide [ci-skip]
2022-04-18 10:08:15 -05:00
Masataka Pocke Kuwabara
c280c5d4d9 [guide] Enable syntax highlight for a code in AR validation guide 2022-04-18 23:28:03 +09:00
Masataka Pocke Kuwabara
70a0754e5d Remove unnecessary note for primary_key in the guide 2022-04-18 10:57:33 +09:00
Xavier Noria
cbfe735c69 Deprecate config.enable_dependency_loading 2022-04-14 22:31:26 +02:00
Xavier Noria
2953ae5c8a Define config.enable_reloading to be !config.cache_classes
Every time I write `config.cache_classes` I have to pause for a moment to make
sure I get it right. It makes you think.

On the other hand, if you read `config.enable_reloading = true`, does the
application reload? You do not need to spend 1 cycle of brain CPU to nod.
2022-04-14 18:11:36 +02:00
Jonathan Hefner
51b4370bb3
Merge pull request #44871 from timchaston/fix-broken-link-for-redis-pub-sub-in-action-cable-overview
Fix broken link for Redis PubSub in 'Action Cable Overview' guide [ci-skip]
2022-04-13 09:44:44 -05:00
Jeremiah
9af580d50e Remove activerecord namespace from example, since it no longer returns the value shown below 2022-04-11 17:41:44 -05:00
Tim Chaston
65946d7eb5 Update URL for Redis Pub/Sub documentation. Change text of link to Redis Pub/Sub documenation to include a slash, to reflect the title on that page. 2022-04-12 06:35:41 +10:00
Jonathan Hefner
98b8b0dd70
Merge pull request #44862 from jackscotti/patch-1
Update source of `secret_key_base` in cookie rotator example [ci-skip]
2022-04-11 09:36:27 -05:00
Shane Boyer
ef291097fc
fix: correct config.host_authorization reference
The Middleware `ActionDispatch::HostAuthorization` configuration documentation references `config.host_configuration`.  Correct this to `config.host_authorization` to match the source code documentation in `action_dispatch/middleware/host_authorization.rb`.
2022-04-11 00:31:27 -04:00
Jack Scotti
4d8e5f8269
Update source of secret_key_base in cookie rotator example
`secrets.secret_key_base` can be one of the many different places where `secret_key_base` is set and therefore it might not work with your application.
Updating the docs to use `Rails.application.secret_key_base` fixes the issue.

Rails `secret_key_base` - [docs](https://api.rubyonrails.org/classes/Rails/Application.html#method-i-secret_key_base)
2022-04-08 17:01:57 +01:00
Viktor Schmidt
22ca875f9c
Add docs about how to use remote browser in test (#44311)
* Add docs about how to use remote browser in test

* Update guides/source/testing.md

Co-authored-by: Lewis Buckley <lewis@lewisbuckley.co.uk>

Co-authored-by: Lewis Buckley <lewis@lewisbuckley.co.uk>
2022-04-06 01:14:41 +05:30
Vipul A M
f3e176c23b
Merge pull request #44574 from NobodysNightmare/fix-activestorage-cdn-example
Fix the example for using a CDN with ActiveStorage
2022-04-05 15:39:22 -04:00
Petrik de Heus
f1c079951d
Merge pull request #44783 from p8/guides/move-validates-associated
Group `validates_associated` guide with `validates_*` [ci-skip]
2022-04-05 21:38:33 +02:00
Petrik de Heus
b5d3301823
Merge pull request #44830 from SkipKayhil/docs-nonce-generator
Document ETag compatible CSP nonce generator [ci skip]
2022-04-05 21:34:40 +02:00
Hartley McGuire
f5cf908122
Document ETag compatible CSP nonce generator
The content_security_policy initializer template was updated in 40b25fd
to suggest a method compatible with conditional GET requests by default,
so this updates the security documentation to describe the difference
between the original value and the "etag compatible" value and when
they should be used.
2022-04-04 23:59:16 -04:00
Aaron Patterson
cfa7284789
Merge pull request #44826 from stefkin/acp-eql-flag
Add a flag to disable deprecated AC::Parameters comparison
2022-04-04 09:09:44 -07:00
eileencodes
ad52c0a197
Remove legacy_connection_handling
This functionality has been deprecated since Rails 6.1 and can now be
removed. I've deleted all code, docs, references, and tests related to
this feature.
2022-04-04 09:36:13 -04:00
Seva Stefkin
67762c2407
Add a flag to disable deprecated AC::Parameters comparison 2022-04-04 10:08:05 +02:00
Xavier Noria
ee907fc38e Document a use case for autoloading in after_initialize 2022-04-01 10:12:13 +02:00
Ghouse Mohamed
9c74d14471 Highlight booleans which are set to config in docs 2022-03-30 03:00:17 +05:30
John Bampton
3b7f55c179 Change yaml to YAML 2022-03-29 15:19:22 +10:00
Petrik
1d08fce0ef Group validates_associated documentation with validates_* [ci-skip]
`validates_associated` makes sure that passed associations are validated
everytime the record is saved. This is unlike other validations that
validate an attribute/association has a certain value.
Typically you won't call:

    validates :books, associated: true

By grouping `validates_associated` with `validates_with` and
`validates_each` it's made clearer `validates_associated` is a bit
different.

With this change the validations are sorted alphabetically.
2022-03-28 20:29:00 +02:00
Gannon McGibbon
d38ed8bf0d
Merge pull request #44781 from ghousemohamed/added-missing-session-store-to-docs
Added missing `config.session_store` option `:cache_store` to docs [ci-skip]
2022-03-28 14:22:24 -04:00
Ghouse Mohamed
f5a79cc197 Added missing config.session_store option to docs 2022-03-28 19:17:16 +05:30
John Bampton
d6f47017ad Fix spelling
Change `there're` to `there are`

`there're` is not in the dictionary and we use `there are` in many places

https://www.dictionary.com/misspelling?term=there%27re
2022-03-27 05:19:40 +10:00
eileencodes
10314c1c84
Update local development guide
* Remove outdated information
* Clean up language and sentence structure to be clearer
* Remove commands that are no longer necessary
* Add note about how to move past the native extension issues with
  mysql2 since it's become a big problem.
2022-03-24 17:29:07 -04:00
Eileen M. Uchitelle
145d86fb37
Merge pull request #44764 from ghousemohamed/highlight-shard-selector-in-docs
Highlight `ShardSelector` class mentioned in the docs [ci-skip]
2022-03-24 12:21:15 -04:00
Ghouse Mohamed
9b2513f219 Highlight ShardSelector class mentioned in the docs 2022-03-24 21:37:24 +05:30
Jonathan Hefner
ad25dfad87
Merge pull request #44727 from tmyksj/description-about-sql-like-sanitization
docs: Add a description about SQL LIKE sanitization [ci-skip]
2022-03-23 17:49:15 -05:00
tmyksj
4dc71e2880 Add a description about LIKE conditions
Condition arguments are escaped to prevent SQL injection, SQL LIKE
wildcards (i.e., `%` and `_`) are not escaped. But there are no
description about SQL LIKE escape in the rails querying guide. So,
this adds a description about SQL LIKE escape to the guide.
2022-03-24 07:32:26 +09:00
Xavier Noria
4103a4a028 Adds a section about the undocumented before_remove_const in the Classic to Zeitwerk HOWTO 2022-03-20 23:05:19 +01:00
Xavier Noria
d28cb5d8d9 Restores some colons for correct grammar 2022-03-20 17:44:34 +01:00
Eileen M. Uchitelle
b589d519a6
Merge pull request #44706 from rails/update-contributing-docs
Modernize contributing docs
2022-03-17 08:26:30 -04:00
eileencodes
4b3910aa32
Modernize contributing docs
I read through these and found that some of the advice was old and/or
outdated. This change takes a pass at improving the contributing guide.
I'll tackle the local development process next.

In my changes I aimed to:

* Remove outdated information about how to do something (for example
  backports should be done with `cherry-pick`, not `.patch` files).
* Rewrite the easiest, easy, and hard way to better explain each version
  rather than refer to them as easy/hard. I also recommend against the
  rails-dev-box for M1's.
* Remove any language that is flippant or dismissive of contribution
  efforts to better.
* Recommend more modern tools and documentation where appropriate.
2022-03-16 14:53:02 -04:00
Alex Ghiculescu
ceeee1d30b
Clarify where t works for _html suffixes
Since https://github.com/rails/rails/pull/43415 this works in views and controllers.
2022-03-16 11:05:50 -06:00
Jonathan Hefner
da91d1cd75
Merge pull request #44684 from jenweber/patch-1
[DOC] Introduce concerns example in Getting Started [ci-skip]
2022-03-16 10:45:09 -05:00
Jen Weber
2fb4c18b0a [DOC] Clarify concerns section of Getting Started
Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2022-03-15 23:30:30 -04:00
Rafael Mendonça França
5c1bd20f0d
Merge pull request #44693 from ghousemohamed/fix-docs-related-gem-versions
Fix `#version` method docs and some typos [ci-skip]
2022-03-15 16:28:07 -04:00
Rafael Mendonça França
f864490d84
Merge pull request #44047 from ryanhertz/cookie-rotator
changed example cookie rotator to be in after_initialize block
2022-03-15 16:21:54 -04:00
Ghouse Mohamed
6ee6cb554b Fix #version docs and some typos 2022-03-16 01:48:37 +05:30
Eileen M. Uchitelle
3fc9d12875
Merge pull request #44685 from SkipKayhil/dym-for-guide-links
use DidYouMean for broken link fixes in guides
2022-03-15 12:10:10 -04:00
Aaron Patterson
4d7a956ccd
Merge pull request #44688 from lewispb/action-mailbox-notification-docs
Document Action Mailbox instrumentation
2022-03-15 08:25:55 -07:00
Jay Bhoyar
477ab7f5c1 Fix typo: NodeJS -> Node.js 2022-03-15 02:52:17 +05:30
Lewis Buckley
b04fa783b7
[skip ci] Document Action Mailbox instrumentation
Follows 246c13f8df833cd8d8ae423af253bf06ceca0fc0
2022-03-14 20:35:08 +00:00
Hartley McGuire
8b71dc15ef use DidYouMean for broken link fixes in guides
Ruby 2.7+ includes DidYouMean::SpellChecker, so we can use that for
suggesting corrections for broken links instead of a vendored
Levenshtein algorithm.
2022-03-14 16:35:06 -04:00
Vipul A M
0ee85c7992
Merge pull request #44683 from ghousemohamed/fix-typo-github 2022-03-14 08:18:11 -04:00
Ghouse Mohamed
60419870b1 Fixed typo: Github -> GitHub 2022-03-14 17:29:10 +05:30
Jesse Sousa
27a2129929
Fix typo 2022-03-13 21:07:06 -03:00
Jonathan Hefner
0a2ba78402
Merge pull request #44598 from araishikeiwai/patch-1
Improve autoloading_and_reloading_constants.md [ci-skip]
2022-03-13 12:56:44 -05:00