Skip to content

Instantly share code, notes, and snippets.

@jesuslerma
Created March 9, 2016 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesuslerma/4c26adbc8d90d709e1ed to your computer and use it in GitHub Desktop.
Save jesuslerma/4c26adbc8d90d709e1ed to your computer and use it in GitHub Desktop.
def attr_redeable(attribute)
hash = {
:naturaleza => {
'1' => "Deudora",
'2' => 'Acreedora'
},
:nivel_cuenta => {
'1' => 'Titulo',
'2' => 'Mayor',
'3' => 'Subcuenta',
'4' => 'Subtitulo'
},
:tipo_cuenta => {
'1' => 'Activo',
'2' => 'Resultados Ingreso',
'3' => 'Resultados Gastos',
'4' => 'Pasivo',
'5' => 'Capital',
'6' => 'Cuentas de orden',
}
}
hash[attribute][self.send(attribute)]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment