mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-17 01:42:53 +00:00
Moving to github
This commit is contained in:
8
app/models/genre.rb
Normal file
8
app/models/genre.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Genre < ApplicationRecord
|
||||
# Associations
|
||||
has_many :game_genres, dependent: :destroy
|
||||
has_many :games, through: :game_genres
|
||||
|
||||
# Validations
|
||||
validates :name, presence: true, uniqueness: { case_sensitive: false }
|
||||
end
|
||||
Reference in New Issue
Block a user