aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
Diffstat (limited to 'guides')
-rw-r--r--guides/source/migrations.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/guides/source/migrations.md b/guides/source/migrations.md
index 9c92efd521..fcfc54a3d7 100644
--- a/guides/source/migrations.md
+++ b/guides/source/migrations.md
@@ -852,7 +852,7 @@ end
# app/models/product.rb
class Product < ActiveRecord::Base
- validates :flag, presence: true
+ validates :flag, :inclusion => { :in => [true, false] }
end
```
@@ -877,7 +877,8 @@ end
# app/models/product.rb
class Product < ActiveRecord::Base
- validates :flag, :fuzz, presence: true
+ validates :flag, :inclusion => { :in => [true, false] }
+ validates :fuzz, presence: true
end
```