From: Ira W. Snyder Date: Mon, 26 Nov 2007 22:47:51 +0000 (-0800) Subject: Add validation to GameGenre and GamePlatform X-Git-Tag: turned-in~22 X-Git-Url: https://www.irasnyder.com/gitweb/?p=cs356-p2-videostore.git;a=commitdiff_plain;h=e96b9243bd4cf589d665b3a4274ac07819e211c1 Add validation to GameGenre and GamePlatform Signed-off-by: Ira W. Snyder --- diff --git a/app/models/game_genre.rb b/app/models/game_genre.rb index 8bcc2f3..605c564 100644 --- a/app/models/game_genre.rb +++ b/app/models/game_genre.rb @@ -1,3 +1,5 @@ class GameGenre < ActiveRecord::Base belongs_to :game + + validates_presence_of :name end diff --git a/app/models/game_platform.rb b/app/models/game_platform.rb index 379684e..4e8ecc9 100644 --- a/app/models/game_platform.rb +++ b/app/models/game_platform.rb @@ -1,3 +1,5 @@ class GamePlatform < ActiveRecord::Base belongs_to :game + + validates_presence_of :name end