Created
October 31, 2012 23:16
-
-
Save guivinicius/3990561 to your computer and use it in GitHub Desktop.
Revisions
-
guivinicius revised this gist
Oct 31, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ # Ruby ``` ruby products = [ {name: 'macbook', price: 5000}, {name: 'pokemon', price: 100} {name: 'livro', price: 50} ] ``` Faça a soma dos valores utilizando a função inject. -
guivinicius revised this gist
Oct 31, 2012 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,11 @@ # Ruby products = [ {name: 'macbook', price: 5000}, {name: 'pokemon', price: 100} {name: 'livro', price: 50} ] Faça a soma dos valores utilizando a função inject. -
guivinicius created this gist
Oct 31, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # Ruby products = [ {name: 'macbook', price: 5000}, {name: 'pokemon', price: 100} {name: 'livro', price: 50} ] Faça a soma dos valores utilizando a função inject. # Rails Crie os modelos dos seguintes relacionamentos. * Um curso pode ter várias disciplinas. * Uma disciplina pode pertencer a vários cursos. * Um curso pode ter várias turmas. * Uma turma tem vários alunos. * Um curso pode ter vários alunos através de turmas.