diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 12:39:17 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 12:39:17 -0400 |
commit | 012b083cbd74ab687d5529258ff045319265e594 (patch) | |
tree | 147d26ccd465fd0761863ca3ac1176bf865166ff /app/models | |
parent | 1ecba46a8cb0db962908f47ab4e054ee04804a4a (diff) | |
download | pokeviewer-012b083cbd74ab687d5529258ff045319265e594.tar.gz pokeviewer-012b083cbd74ab687d5529258ff045319265e594.tar.bz2 pokeviewer-012b083cbd74ab687d5529258ff045319265e594.zip |
Added storage location information to Pokémon
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/pokeviewer/pokemon.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/pokeviewer/pokemon.rb b/app/models/pokeviewer/pokemon.rb index 1e3bfc8..3975550 100644 --- a/app/models/pokeviewer/pokemon.rb +++ b/app/models/pokeviewer/pokemon.rb | |||
@@ -36,6 +36,10 @@ module Pokeviewer | |||
36 | enumerize :unown_letter, in: [:a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, | 36 | enumerize :unown_letter, in: [:a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, |
37 | :l, :m, :n, :o, :p, :q, :r, :s, :t, :u, :v, :w, :x, :y, :z, | 37 | :l, :m, :n, :o, :p, :q, :r, :s, :t, :u, :v, :w, :x, :y, :z, |
38 | :question, :exclamation] | 38 | :question, :exclamation] |
39 | |||
40 | validates :slot, presence: true, | ||
41 | uniqueness: { scope: [:trainer_id, :box] }, | ||
42 | unless: Proc.new { |a| a.trainer.nil? } | ||
39 | 43 | ||
40 | def to_param | 44 | def to_param |
41 | uuid | 45 | uuid |