From 52bac73894ad0fe20d7aec907bbd7f07e83ca477 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 4 Oct 2017 23:03:58 -0400 Subject: Added generic met message for Pokémon from Orre MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pokémon from Orre now display "Met in a trade" instead of an entirely incorrect met location, because we're not currently equipped to display the proper met data for them (see hatkirby/gen3uploader#6). --- app/models/pokeviewer/pokemon.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/models') 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 if: Proc.new { |a| a.met_type == :normal } validates :met_type, presence: true - enumerize :met_type, in: [:normal, :hatched, :npc_trade, :fateful_encounter] + enumerize :met_type, + in: [:normal, :hatched, :npc_trade, :fateful_encounter, :orre] belongs_to :location, optional: true validates :location, presence: true, @@ -153,6 +154,8 @@ module Pokeviewer "Met in a trade." elsif met_type == :fateful_encounter "Obtained in a fateful encounter at Lv. #{met_level}." + elsif met_type == :orre + "Met in a trade." end end -- cgit 1.4.1