diff --git a/app/models/player.rb b/app/models/player.rb index 7032197..9fcf3a4 100644 --- a/app/models/player.rb +++ b/app/models/player.rb @@ -6,6 +6,6 @@ class Player < ApplicationRecord private def default_values self.strikes ||= 0 - self.paid ||= true + self.paid = self.paid.nil? ? true : self.paid end end diff --git a/db/seeds.rb b/db/seeds.rb index 0664d1b..2db5b60 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,3 +6,27 @@ # # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) # Character.create(name: "Luke", movie: movies.first) + +machines = [ + ["Avengers: Infinity Quest", "Pro"], + ["Deadpool", "Pro"], + ["Elvira and the Party Monsters", "Pro"], + ["Family Guy", "Pro"], + ["Godzilla", "Pro"], + ["Goldeneye", "Pro"], + ["Iron Maiden", "Pro"], + ["Jurassic Park", "Pro"], + ["Led Zeppelin", "Pro"], + ["Mandalorian", "Pro"], + ["Metallica", "Pro"], + ["Monster Bash", "Remake"], + ["Star Wars", "Pro"], + ["Stranger Things", "Pro"], + ["Teenage Mutant Ninja Turtles", "Pro"], + ["The Beatles", "Gold"], + ["The Sopranos", "Pro"], +] + +machines.each do |name, edition| + Machine.create(name: name, edition: edition) +end