Skip to content

Instantly share code, notes, and snippets.

@mayo
Forked from cilquirm/gist:11623
Created September 19, 2008 17:40
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 mayo/11624 to your computer and use it in GitHub Desktop.
Save mayo/11624 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