mirror of https://github.com/rails/rails
Merge pull request #45032 from tmyksj/reformat-code-in-placeholder-conditions
docs: Reformat code in Placeholder Conditions [ci-skip]
This commit is contained in:
commit
c7b7fe0de0
|
@ -587,7 +587,7 @@ Similar to the `(?)` replacement style of params, you can also specify keys in y
|
|||
|
||||
```ruby
|
||||
Book.where("created_at >= :start_date AND created_at <= :end_date",
|
||||
{start_date: params[:start_date], end_date: params[:end_date]})
|
||||
{ start_date: params[:start_date], end_date: params[:end_date] })
|
||||
```
|
||||
|
||||
This makes for clearer readability if you have a large number of variable conditions.
|
||||
|
|
Loading…
Reference in New Issue