mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix example related to comparison
in Active Record Validations guide
Flipped the example, to show that end_date should be greater than start_date
This commit is contained in:
parent
f63980173e
commit
2c37a6553e
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ value, proc, or symbol. Any class that includes Comparable can be compared.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class Promotion < ApplicationRecord
|
class Promotion < ApplicationRecord
|
||||||
validates :start_date, comparison: { greater_than: :end_date }
|
validates :end_date, comparison: { greater_than: :start_date }
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue