mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove reading spaces in the code block [ci skip]
Seems that is the reason not to work code highlight.
This commit is contained in:
parent
954ad6bd92
commit
3760cff067
1 changed files with 10 additions and 10 deletions
|
@ -850,19 +850,19 @@ override it on a per model basis. This should help you migrate all your models t
|
||||||
associations required by default.
|
associations required by default.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class Book < ApplicationRecord
|
class Book < ApplicationRecord
|
||||||
# model is not yet ready to have its association required by default
|
# model is not yet ready to have its association required by default
|
||||||
|
|
||||||
self.belongs_to_required_by_default = false
|
self.belongs_to_required_by_default = false
|
||||||
belongs_to(:author)
|
belongs_to(:author)
|
||||||
end
|
end
|
||||||
|
|
||||||
class Car < ApplicationRecord
|
class Car < ApplicationRecord
|
||||||
# model is ready to have its association required by default
|
# model is ready to have its association required by default
|
||||||
|
|
||||||
self.belongs_to_required_by_default = true
|
self.belongs_to_required_by_default = true
|
||||||
belongs_to(:pilot)
|
belongs_to(:pilot)
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Per-form CSRF Tokens
|
#### Per-form CSRF Tokens
|
||||||
|
|
Loading…
Reference in a new issue