Commit Graph

9323 Commits

Author SHA1 Message Date
Rafael Mendonça França 15381dd3b1
Merge pull request #51894 from rails/rm-enable-yjit
Move plumbing to enable yjit to inside the framework
2024-05-23 15:19:39 -04:00
Rafael Mendonça França a8a848d76e
Don't enable automatically_invert_plural_associations by default
This can cause a lot of issues that are hard to detect.

It is better to make this opt-in for people that want to use it.

In Rails 8 we can revisit if we want to enable this config by default.
2024-05-23 19:15:01 +00:00
Rafael Mendonça França 30e6a197df
Move plumbing to enable yjit to inside the framework
There is no reason to expose all those details to users and this
has the benefit that now are can ensure that the YJIT is enabled
after all initialization is done.
2024-05-23 19:01:29 +00:00
Andrew Novoselac a61bfe49a5
Make devcontainer opt-in when creating a new application
For Rails 7.2 we will make devcontainer and opt-in feature for new applications. When creating a new app, you can generate a devcontainer by passing the --devcontainer flag.
2024-05-23 18:43:19 +00:00
Indigo Tech 3855416df8 fix the direct upload class example 2024-05-23 11:54:46 -05:00
Cédric Carrard 992dbd791c
fix #50189 docs section reverting previous migrations mismatch code example 2024-05-22 21:09:42 +02:00
Ngan Pham 397585c22c
Document the transaction.active_record event 2024-05-21 16:43:42 -07:00
Andrey Sobolev 4da74fe880
Add a comma in exceptions section of instrumentation guide 2024-05-20 16:33:30 +03:00
Carlos Antonio da Silva 705b70a2f1
Merge pull request #51833 from akhilgkrishnan/remove-unnecessary-changes
Remove 7.2 release changes from Rails 8.0 release note [ci skip]
2024-05-16 10:21:59 -03:00
Carlos Antonio da Silva 49d4b1c311
Merge pull request #51834 from akhilgkrishnan/point-7-2-stable
Point 7-2-stable branch CHANGELOGS in rails 7-2 release note [ci skip]
2024-05-16 10:17:28 -03:00
Carlos Antonio da Silva 44b142452b
Merge pull request #51840 from p8/guides/i18n-repo
Update link to `i18n` gem repository [ci-skip]
2024-05-16 10:12:15 -03:00
eileencodes ccd5a25e98
Clarify contributing doc to not ping maintainers 2024-05-16 09:10:58 -04:00
Joé Dupuis 478874ae1b
Add `active_record.postgresql_adapter_decode_dates`
to toggle automatic decoding of dates column with the
PostgresqlAdapter.

PR #51483 is a breaking change and should have been gated behind a
config.
2024-05-15 18:38:08 +00:00
Petrik 0f2487b579 Update link to `i18n` gem repository [ci-skip]
The repository got moved to the `ruby-i18n` organization.
The google group no longer seems to be active and is removed as well.
2024-05-15 14:59:27 +02:00
Akhil G Krishnan df15073efd Point 7-2-stable branch CHANGELOGS in rails 7-2 release note 2024-05-15 09:20:28 +05:30
Akhil G Krishnan 84fa2f6d15 Remove 7.2 release changes from Rails 8.0 release note 2024-05-15 08:45:49 +05:30
Takuya Noguchi b9b23111b4 Remove deprecated problem from local dev guide
mysql2 gem, as of mysql2 0.5.6, can now be compiled
with openssl@3 without any option on macOS. Also as
openssl@1.1 got EOL'd on 2023-09-11, we should not
recommend to use it.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2024-05-14 14:35:18 +00:00
Rafael Mendonça França a0e8ea1341
Add Highlights section in the Rails 7.1 release notes 2024-05-13 18:41:52 +00:00
Rafael Mendonça França 37fd0e7fe4
Development of Rails 8.0 starts now
🎉
2024-05-13 16:45:20 +00:00
Rafael Mendonça França be0cb4e8f9
Remove debug require from guides generator 2024-05-10 18:42:55 +00:00
Rafael Mendonça França 0eed7c4ee4
Merge pull request #51637 from Shopify/update-docs-for-devcontainer
Update Getting Start With Rails guide to account for Dev Containers
2024-05-10 15:36:35 -03:00
Carlos Antonio da Silva bc6b432d31
Merge pull request #51504 from MooseCowBear/navigation-highlight
Add navbar highlighting to guides when scrolling [ci skip]
2024-05-09 10:26:05 -03:00
Alex Ghiculescu 2194a738c7 Active Job: Correctly use the desired test adapter in tests 2024-05-09 17:35:50 +10:00
Nikita Vasilevsky 9cadf61835
Warn about changing `query_constraints:` behavior
This commit adds a deprecation warning for the `query_constraints:`
association option. This option will change behavior in the future versions
of Rails and applications are encouraged to switch to `foreign_key:` to preserve the
current behavior.
2024-05-08 20:08:09 +00:00
Xavier Noria dcbd6b0996 Revise the autoloading guide for middleware and friends 2024-05-07 06:25:02 -04:00
sunakan 8e7da61d51 Fix typo in configuring guide 2024-05-04 14:56:38 +09:00
Andrew Novoselac 2bcdfd2595 Update Getting Start With Rails guide to account for Dev Containers
Create a new guide called Getting Started with Dev Containers and link to it from the original Getting Started guide.
2024-05-03 08:53:20 -04:00
Akhil G Krishnan 03a07c16b6 Fix: guides styling issue on light mode 2024-05-03 15:35:44 +05:30
Akhil G Krishnan 3246b8cc0c
Update guides/source/getting_started.md
Co-authored-by: Justin Ko <jko170@gmail.com>
2024-05-02 20:11:50 +05:30
Akhil G Krishnan ea66f754a6 Document .devcontainer to the file/folder structure of new application 2024-05-02 11:26:04 +05:30
Rafael Mendonça França 549144bff7
Merge pull request #51702 from akhilgkrishnan/fix-guides-broken-link
Add rake guides:lint task to raise error on broken anchor links
2024-05-01 19:24:33 -03:00
Rafael Mendonça França b35df004fd
Remove deprecated `Rails::Generators::Testing::Behaviour` 2024-05-01 20:19:21 +00:00
Rafael Mendonça França 5085daf98e
Remove deprecated `find_cmd_and_exec` console helper 2024-05-01 18:46:08 +00:00
Rafael Mendonça França e38dfb2149
Remove deprecated `Rails.config.enable_dependency_loading` 2024-05-01 18:46:07 +00:00
Rafael Mendonça França 0c76f17f2d
Remove deprecated `Rails.application.secrets` 2024-05-01 18:46:04 +00:00
Rafael Mendonça França c48aab17ce
Remove deprecated `ActiveSupport::Notifications::Event#children` and `ActiveSupport::Notifications::Event#parent_of?` 2024-05-01 18:45:46 +00:00
Rafael Mendonça França fc2dc7c8d3
Remove deprecated support to call the following methods without passing a deprecator
- `deprecate`
  - `deprecate_constant`
  - `ActiveSupport::Deprecation::DeprecatedObjectProxy.new`
  - `ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new`
  - `ActiveSupport::Deprecation::DeprecatedConstantProxy.new`
  - `assert_deprecated`
  - `assert_not_deprecated`
  - `collect_deprecations`
2024-05-01 18:45:45 +00:00
Rafael Mendonça França c682bf2641
Remove deprecated `ActiveSupport::Deprecation` delegation to instance 2024-05-01 18:45:44 +00:00
Rafael Mendonça França a45bfd9ee9
Remove deprecated `SafeBuffer#clone_empty` 2024-05-01 18:45:43 +00:00
Rafael Mendonça França be211227a0
Remove deprecated `#to_default_s` from `Array`, `Date`, `DateTime` and `Time` 2024-05-01 18:45:41 +00:00
Rafael Mendonça França c33e2d2e49
Remove deprecated support to passing `Dalli::Client` instances to `MemCacheStore` 2024-05-01 18:45:40 +00:00
Rafael Mendonça França 21f38d3d40
Remove deprecated `config.active_support.use_rfc4122_namespaced_uuids` 2024-05-01 18:45:37 +00:00
Rafael Mendonça França e73e67ee99
Remove deprecated `config.active_support.remove_deprecated_time_with_zone_name` 2024-05-01 18:44:53 +00:00
Rafael Mendonça França 0e6859a237
Remove deprecated `config.active_support.disable_to_s_conversion` 2024-05-01 18:44:52 +00:00
Rafael Mendonça França c4fdfc55fa
Remove deprecated support to bolding log text with positional boolean in `ActiveSupport::LogSubscriber#color` 2024-05-01 18:44:51 +00:00
Rafael Mendonça França 75981ade29
Remove deprecated constants `ActiveSupport::LogSubscriber::CLEAR` and `ActiveSupport::LogSubscriber::BOLD` 2024-05-01 18:44:50 +00:00
Rafael Mendonça França 38bfbcfbea
Remove deprecated support for `config.active_support.cache_format_version = 6.1` 2024-05-01 18:44:49 +00:00
Rafael Mendonça França a3d6a9f5fc
Remove deprecated `:pool_size` and `:pool_timeout` options for the cache storage 2024-05-01 18:44:45 +00:00
Rafael Mendonça França b1b2c6d59c
Remove deprecated support for the pre-Ruby 2.4 behavior of `to_time`
When `to_time_preserves_timezone` was set to `false`, `to_time`
would return a `Time` object with local timezone. This behavior
has been removed.
2024-05-01 18:44:31 +00:00
Rafael Mendonça França 0cf8444d61
Remove deprecated `config.active_storage.silence_invalid_content_types_warning` 2024-05-01 18:44:30 +00:00
Rafael Mendonça França b06252e2a7
Remove deprecated `config.active_storage.replace_on_assign_to_many` 2024-05-01 18:44:29 +00:00
Akhil G Krishnan 61090b1f3f Add rake guides:lint task to raise error on broken anchor links
Co-authored-by: zzak <zzakscott@gmail.com>
2024-05-01 17:29:35 +05:30
zzak c8967521e5
Document buildkite/docs-preview pipeline 2024-05-01 08:05:36 +09:00
Rafael Mendonça França 894f0797ad
Merge pull request #51696 from kaylareopelle/fix-anchor-links-in-instrumentation-guide
[ci skip] Replace — with : in instrumentation subheadings
2024-04-30 18:50:41 -03:00
Rafael Mendonça França 6a6c7e64f5
Remove configuration to control what we do with tests without assertions
This is too much complexity for something low value. Let's just always
warn when a test doesn't have any assertions.

If people want to raise an error or ignore them, they can do so by
overriding `Warning.warn`.
2024-04-30 21:43:54 +00:00
Kayla Reopelle d59d11903c Replace — with : in instrumentation subheadings
When — is used in a subtitle, the anchor links use -%E2%80%94-
instead of —. This prevents the browser jumping to the anchor link.
Replacing — with : fixes the problem.

Co-authored-by: James Bunch <fallwith@gmail.com>
2024-04-30 14:27:06 -07:00
fatkodima 76966f9cb5 Allow assertionless tests to be reported 2024-04-26 18:24:16 +03:00
MooseCowBear 1e13e912bf add navbar highlighting to guides 2024-04-25 12:14:14 -04:00
William Estoque 2fea8e723b Add more gem docs in Rails Application Templates guide
Added doc on how to add a gem with a specific version. Added doc on how to add a comment.
2024-04-25 17:43:49 +08:00
zzak 7c7e4c5476
Fix building guides outside ./guides directory
As is the case with the `rake preview_docs` task.

```
Error reading assets/stylesrc/style.scss: Cannot open file.

Error reading assets/stylesrc/highlight.scss: Cannot open file.

Error reading assets/stylesrc/print.scss: Cannot open file.
```
2024-04-24 09:54:30 +09:00
André Guimarães Sakata f6cace4f83 Use Ruby's official documentation 2024-04-23 17:57:56 -03:00
notapatch 66bc210568 Update guides: Replace filter with action callback
Rails 4.2 onwards replaced filter with action callback. However,
the term has remained in the rails guides and this PR fixes this.

Term used is "action callbacks" as this was used in the changelog:

> Deprecate all *_filter callbacks in favor of *_action callbacks.
[Original Change](489a8f2a44)

Types of change:
- Filter(s) => Action callback(s)
- Generalized the word "Action callbacks" as it is longer.
- actions => "controller actions" to make "controller actions"
  more distinct from "action callbacks".
2024-04-23 15:50:18 +01:00
Carlos Antonio da Silva d462fb54b4 Update builder doc links to point to the rails repo [ci skip]
After reviewing the Action View Overview guide, a discussion started
around the builder gem that was detailed in the guide. We decided to
move it to the rails/ umbrella so we can help maintain it as needed,
since the framework uses/documents it, keeping it similar to jbuilder.

https://github.com/rails/rails/pull/51435#discussion_r1556390070
2024-04-22 10:20:48 -03:00
Rafael Mendonça França fd3a7a2dd2
Merge pull request #49774 from stevepolitodesign/sp-disable-inheritance
Improve STI documentation
2024-04-18 17:37:30 -03:00
John Athayde 76bb36c4df
Add print styles to Rails guides (#51458)
This updates print CSS to be more inline with the overall style. The sidebar is inlined (same as mobile), and content is 100%. Previous code in the launch from boilerplate has been struck or integrated better.

* Links show in text after the original link text
* Border line around code and copy button are removed
* Print is now generated from SCSS to CSS via the generator that builds the other CSS files

Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
2024-04-18 13:31:43 -03:00
Yasuo Honda 4ab320adeb Pin sqlite3 version in bug_report_templates
This commit addresses the CI failure at https://buildkite.com/rails/rails-nightly/builds/424#018eee82-61fb-41ae-bc2b-21bc60dde483/1240

Since https://rubygems.org/gems/sqlite3/versions/2.0.0 has been released, while Rails application just allows sqlite3 gem version 1.*
some of bug_report_templates does not have the same version requirement. these bug report templates attemp to install the latest sqlite3 version 2.0.0, it raises the LoadError.

This version requiremnt is taken from that for Rails application.
0601929486/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb (L14)
0601929486/railties/lib/rails/generators/database.rb (L19)

Gemfile for Rails framework has different version requirement, this commit uses the version requirement for Rails application. Both of them eventually install the sqlite3 1.*.
0601929486/Gemfile (L157)

- Steps to reproduce
```
git clone https://github.com/rails/rails
cd guides/bug_report_templates
ruby action_mailbox.rb
ruby active_record.rb
ruby active_record_migrations.rb
ruby active_storage.rb
```

- Error without this commit
```
$ ruby action_mailbox.rb
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
-- create_table(:active_storage_blobs, {:id=>:primary_key})
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/rubygems_integration.rb:237:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.4), already activated sqlite3-2.0.0-x86_64-linux-gnu. Make sure all dependencies are added to Gemfile. (LoadError)
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:14:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:333:in `resolve_pool_config'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:134:in `establish_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_handling.rb:53:in `establish_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/railtie.rb:304:in `block (2 levels) in <class:Railtie>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/base.rb:338:in `<module:ActiveRecord>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/base.rb:15:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/tasks/database_tasks.rb:506:in `migration_class'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/tasks/database_tasks.rb:510:in `migration_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1032:in `connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1037:in `block in method_missing'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1017:in `block in say_with_time'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/benchmark.rb:298:in `measure'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1017:in `say_with_time'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1036:in `method_missing'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:566:in `create_table'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration/compatibility.rb:110:in `create_table'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activestorage-7.1.3.2/db/migrate/20170806125915_create_active_storage_tables.rb:6:in `change'
	from action_mailbox.rb:51:in `block in <main>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:55:in `instance_eval'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:55:in `define'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:50:in `define'
	from action_mailbox.rb:50:in `<main>'
/home/yahonda/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/rubygems_integration.rb:237:in `block (2 levels) in replace_gem': can't activate sqlite3 (~> 1.4), already activated sqlite3-2.0.0-x86_64-linux-gnu. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:14:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:333:in `resolve_pool_config'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:134:in `establish_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/connection_handling.rb:53:in `establish_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/railtie.rb:304:in `block (2 levels) in <class:Railtie>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activesupport-7.1.3.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/base.rb:338:in `<module:ActiveRecord>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/base.rb:15:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/tasks/database_tasks.rb:506:in `migration_class'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/tasks/database_tasks.rb:510:in `migration_connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1032:in `connection'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1037:in `block in method_missing'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1017:in `block in say_with_time'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/3.3.0/benchmark.rb:298:in `measure'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1017:in `say_with_time'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:1036:in `method_missing'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration.rb:566:in `create_table'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/migration/compatibility.rb:110:in `create_table'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activestorage-7.1.3.2/db/migrate/20170806125915_create_active_storage_tables.rb:6:in `change'
	from action_mailbox.rb:51:in `block in <main>'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:55:in `instance_eval'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:55:in `define'
	from /home/yahonda/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/activerecord-7.1.3.2/lib/active_record/schema.rb:50:in `define'
	from action_mailbox.rb:50:in `<main>'
$
```
2024-04-18 09:48:41 +09:00
bhumi1102 73d692f7fd
[RF-DOCS] Review Action View Overview Guide (#51435)
Review and improve Action View Overview guide [ci-skip]

* Add more code examples and update existing examples.
* Consolidate all topics related to partials in this guide.
* Restructure sections for better flow and readability.
* Reword the introduction and clarify how Action View fits in.

Note: This guide has content that's intertwined with the Layouts and Rendering guide,
with some duplicate content and overlapping concepts. A follow-on PR will focus on
the other guide and then we will do a pass over both guides together.

Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
2024-04-11 16:19:07 -03:00
Carlos Antonio da Silva af78e7fbf9
Merge pull request #51544 from rhiroe/doc/Updated-the-default-digest-algorithm-used-for-key-derivation-in-ActiveRocord-Encryption-to-SHA256
Update the guide reference on the default digest algorithm used
for key derivation in ActiveRecord Encryption to SHA256. [ci skip]
2024-04-11 10:50:50 -03:00
rhiroe 7013b96d76 [ci skip] doc: updated the default digest algorithm used for key derivation in ActiveRecord Encryption to SHA256.
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-encryption-algorithm-changes

```ruby
irb(main):001> Rails.configuration.active_record.encryption.hash_digest_class
=> OpenSSL::Digest::SHA256
irb(main):002> ActiveRecord::Encryption.config.hash_digest_class
=> OpenSSL::Digest::SHA256
```
2024-04-11 10:34:14 +09:00
Carlos Antonio da Silva 84997578c5 Use relative paths on AR basics guide [ci skip]
Most other examples follow this pattern. Plus, using a relative filepath
on the code block will now remove it when using the copy button.
2024-04-10 14:29:12 -03:00
Carlos Antonio da Silva 779d610a97
Merge pull request #51536 from jathayde/scrollbar-color-fix
Changing background color of scrollbar to not be red
2024-04-10 09:56:18 -03:00
John Athayde 68c6fd013e Changing background color of scrollbar to not be red 2024-04-09 19:59:03 -04:00
John Athayde 92b65a0f7e Fix fourth column issue in guides dropdown 2024-04-09 14:47:39 -04:00
Petrik 56a759a22b Remove example filepaths from code blocks in guides
Some code examples use commented out paths for the path where the code
should be written to. These paths can be ignored in the clipboard when
using the "copy" button.

Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
2024-04-09 17:01:29 +02:00
Petrik de Heus d37c533139
Merge pull request #51529 from p8/guides/properyl-escape-sql-comments-in-examples
Use SQL comments for SQL code blocks in guides [ci-skip]
2024-04-09 16:44:50 +02:00
Carlos Antonio da Silva 7661c17ba8
Merge pull request #51355 from asavageiv/alan/update-docs
Replace Order with Book in "Creating Namespaced Models" section
of docs for consistency [ci skip]
2024-04-09 11:42:36 -03:00
Petrik 21ae70375c Use SQL comments for SQL code blocks in guides [ci-skip] 2024-04-09 16:41:53 +02:00
Carlos Antonio da Silva 52dfdbd11c
Merge pull request #51484 from akhilgkrishnan/fix-hover-text-decorator
Fix textdecorator specificity on hovering in guides index [ci skip]
2024-04-09 11:21:51 -03:00
Petrik e641b546ef Properly escape paths in erb example code blocks in guides [ci-skip] 2024-04-09 16:05:02 +02:00
Ridhwana a7e3798965
[RF-DOCS] Action View Helpers Documentation [ci-skip] (#51432)
Review and improve the Action View Helpers guide.

- Reorganize sections, in most cases moving most commonly used helpers up, grouping some of the formatting ones together
- Expand with more examples and a few new methods
- Link back to the API of each helper whenever possible
- Remove WIP

Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
2024-04-09 10:21:57 -03:00
Akhil G Krishnan 521ca4eb5b Fix textdecorator specificity on hovering in index 2024-04-08 23:22:58 +05:30
Carlos Antonio da Silva 4939f39627
Merge pull request #51512 from fatkodima/improve-cable-config-example
Improve ActionCable redis config example [skip ci]
2024-04-08 13:56:02 -03:00
Earlopain 05e5d083fb
Update default value for `content_types_allowed_inline` in guides 2024-04-08 16:33:24 +02:00
fatkodima f638b8b768 Improve ActionCable redis config example [skip ci] 2024-04-08 00:30:19 +03:00
fatkodima bb779f929f Counter cache columns are not marked as readonly [skip ci] 2024-04-06 12:39:08 +03:00
Pablo Alonso 46a1d7f0b2
Update active_record_querying.md 2024-04-05 23:59:53 +02:00
Jean Boussier 30753c1929
Merge pull request #51489 from p8/guides/improve-enqueue-after-transaction-commit-documentation
Fix documentation for `enqueue_after_transaction_commit`
2024-04-04 16:53:22 +02:00
Jean Boussier 40d6385123 Stop generating files with `git_source(:github)`
This has been built-in in Bundler for years now, and the
builtin version is much better as it allows to point to a PR
directly.
2024-04-04 15:04:16 +02:00
Petrik 97e2e93f38 Fix documentation for `enqueue_after_transaction_commit`
Correct some grammar and update the framework defaults documentation
from use `true` and `false` to `:never` and `:default`.
2024-04-04 12:06:18 +02:00
Petrik de Heus 3d418c0551
Merge pull request #51449 from p8/guides/remove-proxy-association
Remove `proxy_association` references from guides [ci-skip]
2024-04-03 19:38:13 +02:00
Jean Boussier e922c59207 Implement Active Job enqueue_after_transaction_commit
A fairly common mistake with Rails is to enqueue a job from inside a
transaction, with a record as argumemnt, which then lead to a RecordNotFound
error when picked up by the queue.

This is even one of the arguments advanced for job runners backed by the
database such as `solid_queue`, `delayed_job` or `good_job`.

But relying on this is undesirable in my opinion as it makes the Active Job
abstraction leaky, and if in the future you need to migrate to another backend
or even just move the queue to a separate database, you may experience a lot of
race conditions of the sort.

To resolve this problem globally, we can make Active Job optionally transaction
aware, and automatically defer job queueing to `after_commit`.

Co-Authored-By: Cristian Bica <cristian.bica@gmail.com>
2024-04-03 16:32:16 +02:00
Jean Boussier eac95d531d Fix the `ActionRecord` typo 2024-04-03 09:32:41 +02:00
fatkodima e79455f3d4 Add the ability to ignore counter cache columns while they are backfilling 2024-04-02 13:59:46 +03:00
Carlos Antonio da Silva 4a7c86af8f
Merge pull request #51456 from lloydk/fix-contrast
Reduce contrast of text and inline code elements [ci skip]
2024-04-01 15:45:20 -03:00
Carlos Antonio da Silva 0c1804db40 Remove guides CSS files that are generated by SCSS
They're overriding the SCSS generated files since the other assets are
copied after SCSS gets generated. Since they're generated every time
with the guides anyway, they are not meant to be saved raw. (for now, at
least)

Closes #51454

[ci skip]
2024-04-01 15:31:25 -03:00
Lloyd Kupchanko b526f11f9d Reduce contrast of text and inline code elements.
To much contrast in dark mode can cause halation and makes
text hard to read.

The Accessible Perceptual Contrast Algorithm (APCA)[1] has
preliminary guidelines ([2]) for maximum contrast in dark mode.

The changes introduced in this PR ensure that the contrast for
text content does not exceed Lc 90 and does not exceed Lc 75 for
large text.

The background color for inline code elements was also darkened
so that there is less contrast with the surrounding text.

1. https://github.com/Myndex
2. https://github.com/Myndex/SAPC-APCA/discussions/106
2024-03-31 12:46:07 -06:00
John Athayde ee4a371645
Guides Dark Mode fixes (#51444)
* Guides feedback fixes

@claudioduarte in https://github.com/rails/rails/discussions/51415

- [x] Make alt, shorter SVG line for mobile, add responsive style
- [x] Add side padding on footer (goes to edge on mobile, does not align on desktop)
- [x] Shrink overall height of subCol so it doesn’t overlap footer

@ivanjuric in https://github.com/rails/rails/discussions/51398

- [x] Flip inverted dark modes on “more Ruby on Rails” nav bar

DHH/Core:

- [x] Darker dark mode (Github style)
- [x] Double box on WIP call out (index.html. editable?)
- [x] NavBar bottom issue clipping on some guides (pad the content?)
- [x] Rounded corners/better appearance on select form elements in header
- [x] Black border on bottom of interstitials

* Additional UI cleanup

- [x] tightening up white space, adding Rails brand HR after intro
- [x] base fontsize to 16px from 18px;
- [x] fixing some darker dark mode issues in the last commit

* Lightening syntax highlight colors
2024-03-30 19:09:38 +01:00
Hartley McGuire 0a40f6ec09
Merge pull request #51437 from CodingItWrong/js-page-typos
Typo fixes on JS page [ci skip]
2024-03-30 12:50:06 -04:00
Jean Boussier d6ec8dbc48 Suggest `inverse_of: nil` instead of `false`
Followup: https://github.com/rails/rails/pull/50883
Ref: https://github.com/rails/rails/pull/50284#issuecomment-2027722175
2024-03-30 09:53:38 +01:00
Josh Justice fba3763b8d Fix typos on Working with JS page
Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
2024-03-29 12:55:28 -04:00