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.
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`.
`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)
* 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>
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.
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.
`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.
* 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.
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.
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.
Ruby 2.7+ includes DidYouMean::SpellChecker, so we can use that for
suggesting corrections for broken links instead of a vendored
Levenshtein algorithm.