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)
Rather than check the `connection_specification_name` when determining
if we need to stop the user from calling `connected_to`, we can just
check the `connection_class?` method which should be `true` for any
class which has called `connects_to`.
* 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.
Since `rails db:structure:{dump,load}` was deprecated there wasn't a simple way to dump a schema to both SQL and Ruby formats. This PR implements @jeremy suggestion @ https://github.com/rails/rails/pull/39470#pullrequestreview-483599714, so you can now do this with an environment variable. For example:
```
SCHEMA_FORMAT=sql rake db:schema:dump
```
This commit addresses the following error.
```ruby
$ ruby -v
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux]
$ cd guides/bug_report_templates
$ ruby action_controller_gem.rb
Fetching gem metadata from https://rubygems.org/...........
... snip ...
Fetching net-protocol 0.1.3
... snip ...
/home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated net-protocol 0.1.2, but your Gemfile requires net-protocol 0.1.3. Since net-protocol is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports net-protocol as a default gem. (Gem::LoadError)
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/runtime.rb:25:in `block in setup'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/spec_set.rb:136:in `each'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/spec_set.rb:136:in `each'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/runtime.rb:24:in `map'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/runtime.rb:24:in `setup'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/inline.rb:71:in `block in gemfile'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/settings.rb:131:in `temporary'
from /home/yahonda/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.4/lib/bundler/inline.rb:55:in `gemfile'
from action_controller_gem.rb:5:in `<main>'
$
```
Background:
- This test fails since net-protocol 0.1.3 has been released on Apr 1, 2022
https://rubygems.org/gems/net-protocol/versions/0.1.3
- Gemfile.lock specifies `net-protocol` 0.1.2, I assume it means "You
have already activated net-protocol 0.1.2,".
https://buildkite.com/rails/rails/builds/85716#dec4bf21-ae22-41db-8cf6-b91ab93b31b5/140-734
```ruby
net-protocol (0.1.2)
```
- Actually, I do not know why this `action_controller_gem.rb` only fails with Ruby
3.0 or higher, Ruby 2.7 works fine.