Add backticks [ci-skip]

This commit is contained in:
Jonathan Hefner 2022-02-09 11:50:00 -06:00
parent 4ae7acf00d
commit a84788e117
4 changed files with 13 additions and 13 deletions

View File

@ -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).

View File

@ -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

View File

@ -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

View File

@ -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: