about summary refs log tree commit diff stats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/pokeviewer/pokemon.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/pokeviewer/pokemon.rb b/app/models/pokeviewer/pokemon.rb index 3818f58..18d1533 100644 --- a/app/models/pokeviewer/pokemon.rb +++ b/app/models/pokeviewer/pokemon.rb
@@ -49,7 +49,8 @@ module Pokeviewer
49 if: Proc.new { |a| a.met_type == :normal } 49 if: Proc.new { |a| a.met_type == :normal }
50 50
51 validates :met_type, presence: true 51 validates :met_type, presence: true
52 enumerize :met_type, in: [:normal, :hatched, :npc_trade, :fateful_encounter] 52 enumerize :met_type,
53 in: [:normal, :hatched, :npc_trade, :fateful_encounter, :orre]
53 54
54 belongs_to :location, optional: true 55 belongs_to :location, optional: true
55 validates :location, presence: true, 56 validates :location, presence: true,
@@ -153,6 +154,8 @@ module Pokeviewer
153 "Met in a trade." 154 "Met in a trade."
154 elsif met_type == :fateful_encounter 155 elsif met_type == :fateful_encounter
155 "Obtained in a fateful encounter at Lv. #{met_level}." 156 "Obtained in a fateful encounter at Lv. #{met_level}."
157 elsif met_type == :orre
158 "Met in a trade."
156 end 159 end
157 end 160 end
158 161