The workflow we will follow looks like this:
- Planning
- Initializing Application
- Building the Rails Model
- Configure our Dev Environment
- Defining Routes
- Writing Controllers and their Views (iterate)
- Styling Views
- Share!
The workflow we will follow looks like this:
def seeder | |
song_data = {"yeahyeahyeahs"=>[{:title=>"Maps", :album=>"Fever to Tell", :preview_link=>"http://a1748.phobos.apple.com/us/r1000/074/Music/d4/97/e7/mzm.bigdtgoz.aac.p.m4a", :artwork=>"http://a3.mzstatic.com/us/r30/Features/d6/ba/99/dj.homcvzwl.60x60-50.jpg"}, {:title=>"Heads Will Roll", :album=>"It's Blitz! (Deluxe Edition)", :preview_link=>"http://a308.phobos.apple.com/us/r1000/064/Music/9c/a6/3a/mzm.zgjjoqyj.aac.p.m4a", :artwork=>"http://a1.mzstatic.com/us/r30/Music/4c/30/8c/mzi.gcicgujl.60x60-50.jpg"}, {:title=>"Gold Lion", :album=>"Show Your Bones", :preview_link=>"http://a850.phobos.apple.com/us/r1000/105/Music/d0/b6/fe/mzm.qoeoeazp.aac.p.m4a", :artwork=>"http://a5.mzstatic.com/us/r30/Features/73/a1/1a/dj.mwlaurzf.60x60-50.jpg"}, {:title=>"Sacrilege", :album=>"Mosquito (Deluxe Version)", :preview_link=>"http://a1575.phobos.apple.com/us/r1000/103/Music/v4/0a/1b/fb/0a1bfb63-cc3d-1669-4894-c9e35dcfe00e/mzaf_6367038940470066542.aac.m4a", :artwork=>"http://a4.mzstatic.com/us/r30/Music/v4/fc/72/f7/f |
{ | |
"1":{ | |
"name":"Bulbasaur", | |
"attack":49, | |
"defense":49, | |
"evolveLevel":16, | |
"evolveTo":"2", | |
"type":"grass", | |
"moves":[ | |
"tackle", |
response = '{"data":[{"type":"gif","id":"PTYC8lw49Er9m","url":"http:\/\/giphy.com\/gifs\/PTYC8lw49Er9m","bitly_gif_url":"http:\/\/gph.is\/Z14JOZ","bitly_url":"http:\/\/gph.is\/Z14JOZ","embed_url":"http:\/\/giphy.com\/embed\/PTYC8lw49Er9m","username":"","source":"http:\/\/tomhiddles.tumblr.com\/post\/27846623856","rating":"g","trending_datetime":"1970-01-01 00:00:00","images":{"fixed_height":{"url":"http:\/\/media2.giphy.com\/media\/PTYC8lw49Er9m\/200.gif","width":"162","height":"200","mp4":"http:\/\/media.giphy.com\/media\/PTYC8lw49Er9m\/200.mp4"},"fixed_height_still":{"url":"http:\/\/media3.giphy.com\/media\/PTYC8lw49Er9m\/200_s.gif","width":"162","height":"200"},"fixed_height_downsampled":{"url":"http:\/\/media0.giphy.com\/media\/PTYC8lw49Er9m\/200_d.gif","width":"162","height":"200"},"fixed_width":{"url":"http:\/\/media2.giphy.com\/media\/PTYC8lw49Er9m\/200w.gif","width":"200","height":"247","mp4":"http:\/\/media.giphy.com\/media\/PTYC8lw49Er9m\/200w.mp4"},"fixed_width_still":{"url":"http:\/\/media0.giphy. |
const a = [10,20,30,40]; | |
const b = [10,10,20,30,40]; | |
const c = [10,10,20,20,30,30]; | |
const d = [10,10,20,20,30,30,40,10]; | |
const benchmark = [...a, ...b, ...c, ...d]; | |
/* | |
Using two for loops |