From 3a90f12317372e534d0c42ddacb01ba0ab88f16a Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Wed, 8 Jul 2020 14:51:57 -0500 Subject: [PATCH] Use appropriate code fences [ci skip] Follow-up to #39620. This commit changes a few overlooked code fences to `bash`, and changes a few IRB session snippets to be only Ruby code with a `ruby` fence. --- guides/source/3_2_release_notes.md | 2 +- guides/source/action_mailbox_basics.md | 2 +- guides/source/active_record_validations.md | 4 +++- guides/source/plugins.md | 5 ++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/guides/source/3_2_release_notes.md b/guides/source/3_2_release_notes.md index 20f6a8f797..77de8c91cb 100644 --- a/guides/source/3_2_release_notes.md +++ b/guides/source/3_2_release_notes.md @@ -150,7 +150,7 @@ Railties * Allow scaffold/model/migration generators to accept "index" and "uniq" modifiers. For example, - ```ruby + ```bash bin/rails g scaffold Post title:string:index author:uniq price:decimal{7,2} ``` diff --git a/guides/source/action_mailbox_basics.md b/guides/source/action_mailbox_basics.md index 6c6fa906d9..5daf79fdc1 100644 --- a/guides/source/action_mailbox_basics.md +++ b/guides/source/action_mailbox_basics.md @@ -279,7 +279,7 @@ end Then set up a mailbox: -```ruby +```bash # Generate new mailbox $ bin/rails generate mailbox forwards ``` diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index ac43f87009..2825b4fe36 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -86,13 +86,15 @@ end We can see how it works by looking at some `bin/rails console` output: ```ruby -$ bin/rails console >> p = Person.new(name: "John Doe") => # + >> p.new_record? => true + >> p.save => true + >> p.new_record? => false ``` diff --git a/guides/source/plugins.md b/guides/source/plugins.md index 85eaec8dd1..9d5bef91a9 100644 --- a/guides/source/plugins.md +++ b/guides/source/plugins.md @@ -135,10 +135,9 @@ To test that your method does what it says it does, run the unit tests with `bin 2 runs, 2 assertions, 0 failures, 0 errors, 0 skips ``` -To see this in action, change to the `test/dummy` directory, fire up a console, and start squawking: +To see this in action, change to the `test/dummy` directory, start `bin/rails console`, and commence squawking: -```bash -$ bin/rails console +```ruby >> "Hello World".to_squawk => "squawk! Hello World" ```