Skip to content

Instantly share code, notes, and snippets.

@Fernan2
Created January 17, 2017 19:46
Show Gist options
  • Save Fernan2/60d4b9d65a07021539a3e65d053dab1a to your computer and use it in GitHub Desktop.
Save Fernan2/60d4b9d65a07021539a3e65d053dab1a to your computer and use it in GitHub Desktop.
Enumerados en Rails y Postgres 6
class Prestamo < ActiveRecord::Base
enum finalidad: {
reunificar: 'Reunificar deudas',
estudios: 'Estudios',
imprevistos: 'Imprevistos',
compra_vehiculo: 'Compra de vehículo',
viaje: 'Viaje',
reformas: 'Reformas hogar',
otros: 'Otros'
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment