Skip to content

Instantly share code, notes, and snippets.

@marialecodes
Created April 3, 2015 05:49
Show Gist options
  • Save marialecodes/f1da3c072003b2dc6630 to your computer and use it in GitHub Desktop.
Save marialecodes/f1da3c072003b2dc6630 to your computer and use it in GitHub Desktop.
En modelo User:
def crear_curso(user_id)
for i in 1..34
i == 1 ? (conocido = false) : (conocido = nil)
conocimiento = Conocimiento.new(
user_id: user_id,
conocido: conocido,
concepto_id: i,
intentos: 0,
revision: false)
conocimiento.save
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment