Skip to content

Commit

Permalink
Fix documentation indentation:
Browse files Browse the repository at this point in the history
- This was breaking the code highlight in the doc
  • Loading branch information
Edouard-chin committed Dec 18, 2019
1 parent 7fa807d commit a217192
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions guides/source/upgrading_ruby_on_rails.md
Expand Up @@ -849,21 +849,21 @@ The configuration is by default global for all your models, but you can
override it on a per model basis. This should help you migrate all your models to have their
associations required by default.

```ruby
class Book < ApplicationRecord
# model is not yet ready to have its association required by default
```ruby
class Book < ApplicationRecord
# model is not yet ready to have its association required by default

self.belongs_to_required_by_default = false
belongs_to(:author)
end
self.belongs_to_required_by_default = false
belongs_to(:author)
end

class Car < ApplicationRecord
# model is ready to have its association required by default
class Car < ApplicationRecord
# model is ready to have its association required by default

self.belongs_to_required_by_default = true
belongs_to(:pilot)
end
```
self.belongs_to_required_by_default = true
belongs_to(:pilot)
end
```

#### Per-form CSRF Tokens

Expand Down

0 comments on commit a217192

Please sign in to comment.