From a84788e117de633cef89d996f90c6959756c41d7 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Wed, 9 Feb 2022 11:50:00 -0600 Subject: [PATCH] Add backticks [ci-skip] --- guides/source/action_controller_overview.md | 2 +- guides/source/active_record_querying.md | 2 +- .../source/active_support_instrumentation.md | 20 +++++++++---------- guides/source/generators.md | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 13f11c0921..56b670db5f 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -379,7 +379,7 @@ Your application has a session for each user in which you can store small amount * [`ActionDispatch::Session::CookieStore`][] - Stores everything on the client. * [`ActionDispatch::Session::CacheStore`][] - Stores the data in the Rails cache. * `ActionDispatch::Session::ActiveRecordStore` - Stores the data in a database using Active Record (requires the `activerecord-session_store` gem). -* [`ActionDispatch::Session::MemCacheStore`][] - Stores the data in a memcached cluster (this is a legacy implementation; consider using CacheStore instead). +* [`ActionDispatch::Session::MemCacheStore`][] - Stores the data in a memcached cluster (this is a legacy implementation; consider using `CacheStore` instead). All session stores use a cookie to store a unique ID for each session (you must use a cookie, Rails will not allow you to pass the session ID in the URL as this is less secure). diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 8a0d946519..cd6063a027 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1325,7 +1325,7 @@ time_range = (Time.now.midnight - 1.day)..Time.now.midnight Customer.joins(:orders).where(orders: { created_at: time_range }).distinct ``` -For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the Order model: +For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the `Order` model: ```ruby class Order < ApplicationRecord diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md index 07f158fabb..29fad7ecbc 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -256,10 +256,10 @@ INFO. Additional keys may be added by the caller. #### unpermitted_parameters.action_controller -| Key | Value | -| ------------- | --------------------------------------------------------------------- | -| `:keys` | The unpermitted keys | -| `:context` | Hash with the following keys: :controller, :action, :params, :request | +| Key | Value | +| ------------- | ----------------------------------------------------------------------------- | +| `:keys` | The unpermitted keys | +| `:context` | Hash with the following keys: `:controller`, `:action`, `:params`, `:request` | ### Action Dispatch @@ -419,12 +419,12 @@ INFO. The adapters will add their own data as well. #### cache_read.active_support -| Key | Value | -| ------------------ | ------------------------------------------------- | -| `:key` | Key used in the store | -| `:store` | Name of the store class | -| `:hit` | If this read is a hit | -| `:super_operation` | :fetch is added when a read is used with `#fetch` | +| Key | Value | +| ------------------ | --------------------------------------------------- | +| `:key` | Key used in the store | +| `:store` | Name of the store class | +| `:hit` | If this read is a hit | +| `:super_operation` | `:fetch` is added when a read is used with `#fetch` | #### cache_generate.active_support diff --git a/guides/source/generators.md b/guides/source/generators.md index 16b1eeacd4..b0f45ed4a0 100644 --- a/guides/source/generators.md +++ b/guides/source/generators.md @@ -206,7 +206,7 @@ $ bin/rails generate scaffold User name:string create test/system/users_test.rb ``` -Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything; it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the scaffold_controller generator, which invokes erb, test_unit and helper generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication. +Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything; it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the `scaffold_controller` generator, which invokes `erb`, `test_unit` and `helper` generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication. The next customization on the workflow will be to stop generating stylesheet and test fixture files for scaffolds altogether. We can achieve that by changing our configuration to the following: