Skip to content

Instantly share code, notes, and snippets.

@cilquirm
Created September 19, 2008 17:37
Show Gist options
  • Save cilquirm/11623 to your computer and use it in GitHub Desktop.
Save cilquirm/11623 to your computer and use it in GitHub Desktop.
module MarcasDeTiempo
def self.included(base)
# Propiedades especiales
# Permite guardar la fecha y hora de eliminación del recurso
property :deleted_at, ParanoidDateTime
# Permite conocer cuándo fue creado y cuándo fue modificado el recurso
property :created_at, DateTime
property :updated_at, DateTime
end
end
class Banco
include MarcasDeTiempo
include DataMapper::Resource
# Propiedades principales
property :id, Serial
property :nombre, String
property :nombre_corto, String
property :sucursal, String
property :telefono, String
property :direccion, String
property :contacto, String
property :aba, String
end
/home/vcruz/dev/sif/app/models/banco.rb:2:in `included': wrong number of arguments (1 for 0) (ArgumentError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment