Created
April 7, 2015 18:36
-
-
Save marialecodes/b3bd838e911d11c0b986 to your computer and use it in GitHub Desktop.
This file contains 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 characters
n_conceptos_nivel = conceptos_nivel.count | |
conceptos_conocidos_nivel = conocimientos | |
.joins(:concepto) | |
.where(concepto: conceptos_nivel) | |
.order(' | |
CASE | |
WHEN conocido = TRUE then 1 | |
WHEN conocido = FALSE then 2 | |
WHEN conocido IS NULL then 3 | |
END | |
') | |
.pluck( | |
'conceptos.id', | |
'conceptos.nombre', | |
'conocimientos.conocido', | |
'conocimientos.revision', | |
'conocimientos.procesando' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment