about summary refs log tree commit diff stats
path: root/app/models
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-09-24 11:33:55 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-24 11:33:55 -0400
commit1ecba46a8cb0db962908f47ab4e054ee04804a4a (patch)
treec47b8a00967411a708d3021f46d9b4cf63d6fdfe /app/models
parent2405727d7d62fce31102520167cde42ee688c198 (diff)
downloadpokeviewer-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.rb3
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 }