Skip to content

Commit 1d9d009

Browse files
authored
Fix ruby syntax highlighting in yard docs (#1777)
This fixes syntax highlighting for the Enum Traits section on rubydoc.info
1 parent d5ed6dc commit 1d9d009

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

GETTING_STARTED.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ end
642642

643643
Or inline using attributes from the factory:
644644

645-
```rb
645+
```ruby
646646
factory :post do
647647
# ...
648648
author_last_name { "Writely" }
@@ -1153,7 +1153,7 @@ When working with uniqueness constraints, be careful not to pass in override val
11531153

11541154
In this example the email will be the same for both users. If email must be unique, this code will error:
11551155

1156-
```rb
1156+
```ruby
11571157
factory :user do
11581158
sequence(:email) { |n| "person#{n}@example.com" }
11591159
end
@@ -1419,7 +1419,7 @@ create :invoice, :with_amount, amount: 2
14191419

14201420
Given an Active Record model with an enum attribute:
14211421

1422-
```rb
1422+
```ruby
14231423
class Task < ActiveRecord::Base
14241424
enum status: {queued: 0, started: 1, finished: 2}
14251425
end
@@ -1429,7 +1429,7 @@ end
14291429
factory\_bot will automatically define traits for each possible value of the
14301430
enum:
14311431

1432-
```rb
1432+
```ruby
14331433
FactoryBot.define do
14341434
factory :task
14351435
end
@@ -1441,7 +1441,7 @@ FactoryBot.build(:task, :finished)
14411441

14421442
Writing the traits out manually would be cumbersome, and is not necessary:
14431443

1444-
```rb
1444+
```ruby
14451445
FactoryBot.define do
14461446
factory :task do
14471447
trait :queued do
@@ -1466,7 +1466,7 @@ desired, it is possible to disable the feature by setting
14661466
In that case, it is still possible to explicitly define traits for an enum
14671467
attribute in a particular factory:
14681468

1469-
```rb
1469+
```ruby
14701470
FactoryBot.automatically_define_enum_traits = false
14711471

14721472
FactoryBot.define do
@@ -1481,7 +1481,7 @@ specifically tied to Active Record enum attributes.
14811481

14821482
With an array:
14831483

1484-
```rb
1484+
```ruby
14851485
class Task
14861486
attr_accessor :status
14871487
end
@@ -1495,7 +1495,7 @@ end
14951495

14961496
Or with a hash:
14971497

1498-
```rb
1498+
```ruby
14991499
class Task
15001500
attr_accessor :status
15011501
end

0 commit comments

Comments
 (0)