From 8add8964f6e9815d82b4c549cbbc606bb5121b8a Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Fri, 23 Aug 2024 11:56:49 -0300 Subject: [PATCH] chore: cleanup after #20 --- playground/vanilla/app/models/song.rb | 2 +- playground/vanilla/db/schema.rb | 1 - playground/vanilla/db/seeds.rb | 22 +++++++++++----------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/playground/vanilla/app/models/song.rb b/playground/vanilla/app/models/song.rb index 41471c9..7fc8af4 100644 --- a/playground/vanilla/app/models/song.rb +++ b/playground/vanilla/app/models/song.rb @@ -2,6 +2,6 @@ class Song < ApplicationRecord belongs_to :composer has_many :video_clips - enum genre: { disco: "disco", rock: "rock", classical: "classical" } + enum genre: {disco: "disco", rock: "rock", classical: "classical"} enum tempo: %w[slow medium fast] end diff --git a/playground/vanilla/db/schema.rb b/playground/vanilla/db/schema.rb index 6cb2c05..b17aee1 100644 --- a/playground/vanilla/db/schema.rb +++ b/playground/vanilla/db/schema.rb @@ -11,7 +11,6 @@ # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 2024_02_27_112250) do - create_table "composers", force: :cascade do |t| t.text "first_name" t.text "last_name" diff --git a/playground/vanilla/db/seeds.rb b/playground/vanilla/db/seeds.rb index a07e7c1..f701923 100644 --- a/playground/vanilla/db/seeds.rb +++ b/playground/vanilla/db/seeds.rb @@ -1,14 +1,14 @@ -dylan_ryche = Composer.create!(first_name: "Dylan", last_name: "Ryche") -maximo_mussini = Composer.create!(first_name: "Máximo", last_name: "Mussini") -leon_gieco = Composer.create!(first_name: "León", last_name: "Gieco") -calum_graham = Composer.create!(first_name: "Calum", last_name: "Graham") -matteo_brenci = Composer.create!(first_name: "Matteo", last_name: "Brenci") -michael_hedges = Composer.create!(first_name: "Michael", last_name: "Hedges") -antonio_lauro = Composer.create!(first_name: "Antonio", last_name: "Lauro") -celso_machado = Composer.create!(first_name: "Celso", last_name: "Machado") -astor_piazzolla = Composer.create!(first_name: "Astor", last_name: "Piazzolla") -jorge_cardoso = Composer.create!(first_name: "Jorge", last_name: "Cardoso") -domingos_semenzato = Composer.create!(first_name: "Domingos", last_name: "Semenzato") +dylan_ryche = Composer.create!(first_name: "Dylan", last_name: "Ryche", genre: "rock") +maximo_mussini = Composer.create!(first_name: "Máximo", last_name: "Mussini", genre: "rock") +leon_gieco = Composer.create!(first_name: "León", last_name: "Gieco", genre: "rock") +calum_graham = Composer.create!(first_name: "Calum", last_name: "Graham", genre: "rock") +matteo_brenci = Composer.create!(first_name: "Matteo", last_name: "Brenci", genre: "rock") +michael_hedges = Composer.create!(first_name: "Michael", last_name: "Hedges", genre: "rock") +antonio_lauro = Composer.create!(first_name: "Antonio", last_name: "Lauro", genre: "classical") +celso_machado = Composer.create!(first_name: "Celso", last_name: "Machado", genre: "classical") +astor_piazzolla = Composer.create!(first_name: "Astor", last_name: "Piazzolla", genre: "classical") +jorge_cardoso = Composer.create!(first_name: "Jorge", last_name: "Cardoso", genre: "classical") +domingos_semenzato = Composer.create!(first_name: "Domingos", last_name: "Semenzato", genre: "classical") smoke_signals = Song.create(title: "Smoke Signals", composer: dylan_ryche) camino_libre = Song.create(title: "Camino Libre", composer: maximo_mussini)