From 1ecba46a8cb0db962908f47ab4e054ee04804a4a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 24 Sep 2017 11:33:55 -0400 Subject: Added OT gender field --- app/models/pokeviewer/pokemon.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models') diff --git a/app/models/pokeviewer/pokemon.rb b/app/models/pokeviewer/pokemon.rb index 1410d37..1e3bfc8 100644 --- a/app/models/pokeviewer/pokemon.rb +++ b/app/models/pokeviewer/pokemon.rb @@ -14,6 +14,9 @@ module Pokeviewer validates :ot_number, presence: true, numericality: { greater_than_or_equal_to: 0, only_integer: true } + validates :ot_gender, presence: true + enumerize :ot_gender, in: [:female, :male] + validates :met_level, presence: true, numericality: { greater_than_or_equal_to: 1, only_integer: true }, if: Proc.new { |a| a.met_type == :normal } -- cgit 1.4.1