Skip to content

Instantly share code, notes, and snippets.

@ellijayne
Created July 14, 2018 11:49
Show Gist options
  • Save ellijayne/8f0ec18854d008c0e0abf44f84d284c5 to your computer and use it in GitHub Desktop.
Save ellijayne/8f0ec18854d008c0e0abf44f84d284c5 to your computer and use it in GitHub Desktop.
seed info
#user sseds
User.destroy_all
user1 = User.create :username => 'elli_jayne', :email => '[email protected]'
#album seed info
Album.destroy_all
album1 = Album.create :title => 'Take Off Your Pants And Jacket', :date => '2001-12-06', :tracks => 'Anthem Part, Two Online Songs, First Date, Happy Holidays You Bastard, Story of a Lonely Guy, The Rock Show, Stay Together for the Kids, Roller Coaster, Reckless Abandon, Every Time I Look for You, Give Me One Good Reason, Shut Up, Please Take Me Home, Time to Break Up'
album2 = Album.create :title => 'Go Farther in Lightness', :date => '2017-08-18'
#artist seed info
Artist.destroy_all
artist1 = Artist.create :name => 'Blink 182'
artist2 = Artist.create :name => 'Gang of Youths'
#pressing seed info
Pressing.destroy_all
pressing1 = Pressing.create :year => 2014, :limited => true, :color => "white", :weight => "180 grams", :gatefold => true, :remastered => true, :quantity_pressed => 1500, :virgin_vinyl => false, :lp_qty => 1
pressing2 = Pressing.create :year => 2017, :limited => true, :color => 'clear', :weight => "180 grams", :gatefold => true, :lp_qty => 2
#associations
#artists and albums
artist1.albums << album1 #putting album1 into artists 1 album section
artist2.albums << album2
#users and albums
user1.albums << album1 << album2
user2.albums << album1
#users and artists? dont know if this is favouriting???
user1.artists << artist1 << artist2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment