Skip to content

Instantly share code, notes, and snippets.

@tgaff
Created September 23, 2015 20:35
Show Gist options
  • Save tgaff/47aded687994e892a2e1 to your computer and use it in GitHub Desktop.
Save tgaff/47aded687994e892a2e1 to your computer and use it in GitHub Desktop.
music seeds for student music apps
a1 = Artist.new(name: 'Jay-z',
description: 'Shawn Corey Carter (born December 4, 1969),[2] known by his stage name Jay Z (formerly Jay-Z),[3][4][5] is an American rapper, record producer, and entrepreneur. He is one of the most financially successful hip hop artists and entrepreneurs in America.',
image_url: 'http://www.loscontroladores.com/wp-content/uploads/2015/08/jay-z-live-2015-700x519.jpg'
)
a1.songs.build(title: "Run This Town",
length: '4:27',
genre: 'rap'
)
a1.songs.build(title: "Off That",
length: '4:17',
genre: 'rap'
)
a1.save
a2 = Artist.new(name: 'The Knife',
description: 'The Knife were a Swedish electronic music duo from Gothenburg formed in 1999. The group consisted of siblings Karin Dreijer Andersson and Olof Dreijer, who together also run their own rec',
image_url: 'http://holeytonal.com/wp-content/uploads/2013/01/the_knife-628x400.jpg'
)
a2.songs.build(title: 'Forest Families',
length: '3',
genre: 'indietronica'
)
a2.songs.build(title: 'Silent shout',
length: '4',
genre: 'synthpop'
)
a2.songs.build(title: "Girls' Night Out",
length: '4',
genre: 'indietronica'
)
a2.save!
@tgaff
Copy link
Author

tgaff commented Sep 23, 2015

rails runner music_seeds.rb

@Borgaard
Copy link

Snazzy 👍 🌵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment