1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Tiny documentation edits [ci skip]

This commit is contained in:
Robin Dupret 2015-06-07 16:01:09 +02:00
parent 911f189f88
commit b10c3866d7
3 changed files with 7 additions and 4 deletions

View file

@ -122,9 +122,9 @@ module ActiveModel
# user.notes = [note]
#
# user.serializable_hash
# #=> {"name" => "Napoleon"}
# # => {"name" => "Napoleon"}
# user.serializable_hash(include: { notes: { only: 'title' }})
# #=> {"name" => "Napoleon", "notes" => [{"title"=>"Battle of Austerlitz"}]}
# # => {"name" => "Napoleon", "notes" => [{"title"=>"Battle of Austerlitz"}]}
def serializable_hash(options = nil)
options ||= {}

View file

@ -516,7 +516,8 @@ There are a number of settings available on `config.action_mailer`:
config.action_mailer.show_previews = false
```
* `config.action_mailer.deliver_later_queue_name`. specifies the queue name for mailers. By default this is `mailers`.
* `config.action_mailer.deliver_later_queue_name` specifies the queue name for
mailers. By default this is `mailers`.
### Configuring Active Support

View file

@ -1240,7 +1240,9 @@ article we want to show the form back to the user.
We reuse the `article_params` method that we defined earlier for the create
action.
TIP: It is not necessary to pass all the attributes to `update`. For example, if `@article.update(title: 'A new title')` were called, Rails would only update the `title` attribute, leaving all other attributes untouched.
TIP: It is not necessary to pass all the attributes to `update`. For example,
if `@article.update(title: 'A new title')` was called, Rails would only update
the `title` attribute, leaving all other attributes untouched.
Finally, we want to show a link to the `edit` action in the list of all the
articles, so let's add that now to `app/views/articles/index.html.erb` to make