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 12:39:17 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-09-24 12:39:17 -0400
commit012b083cbd74ab687d5529258ff045319265e594 (patch)
tree147d26ccd465fd0761863ca3ac1176bf865166ff /app/models
parent1ecba46a8cb0db962908f47ab4e054ee04804a4a (diff)
downloadpokeviewer-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.rb4
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