diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 11:33:55 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 11:33:55 -0400 |
commit | 1ecba46a8cb0db962908f47ab4e054ee04804a4a (patch) | |
tree | c47b8a00967411a708d3021f46d9b4cf63d6fdfe /app/models | |
parent | 2405727d7d62fce31102520167cde42ee688c198 (diff) | |
download | pokeviewer-1ecba46a8cb0db962908f47ab4e054ee04804a4a.tar.gz pokeviewer-1ecba46a8cb0db962908f47ab4e054ee04804a4a.tar.bz2 pokeviewer-1ecba46a8cb0db962908f47ab4e054ee04804a4a.zip |
Added OT gender field
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/pokeviewer/pokemon.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
14 | validates :ot_number, presence: true, | 14 | validates :ot_number, presence: true, |
15 | numericality: { greater_than_or_equal_to: 0, only_integer: true } | 15 | numericality: { greater_than_or_equal_to: 0, only_integer: true } |
16 | 16 | ||
17 | validates :ot_gender, presence: true | ||
18 | enumerize :ot_gender, in: [:female, :male] | ||
19 | |||
17 | validates :met_level, presence: true, | 20 | validates :met_level, presence: true, |
18 | numericality: { greater_than_or_equal_to: 1, only_integer: true }, | 21 | numericality: { greater_than_or_equal_to: 1, only_integer: true }, |
19 | if: Proc.new { |a| a.met_type == :normal } | 22 | if: Proc.new { |a| a.met_type == :normal } |