Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am despinozac on github.
  • I am despinozac (https://keybase.io/despinozac) on keybase.
  • I have a public key ASBJXd3SzehhJNqmIYf9m5Jwb4myn58ubKRd7CMkfgZQywo

To claim this, I am signing this object:

@despinozac
despinozac / auditable.rb
Created March 7, 2016 23:03
Auditable Module
module Auditable
extend ActiveSupport::Concern
# Array de exclusion de auditoŕia
BLACK_LIST = ["created_at", "updated_at", "metadata"]
included do
before_update :audit_record_update
@despinozac
despinozac / gist:6280720
Created August 20, 2013 12:26
Solución planteada al problema visto en clase 19/08 en escuelaweb.
def cuadrado(n)
n*n
end
def cubo(n)
n*n*n
end
def cuarta(n)
n*n*n*n
@despinozac
despinozac / gist:5620158
Last active December 17, 2015 13:49
Inflectors para Español.
ActiveSupport::Inflector.inflections do |inflect|
inflect.plural(/$/, 's')
inflect.plural(/([^aeéiou])$/i, '\1es')
inflect.plural(/([aeiou]s)$/i, '\1')
inflect.plural(/z$/i, 'ces')
inflect.plural(/á([sn])$/i, 'a\1es')
inflect.plural(/é([sn])$/i, 'e\1es')
inflect.plural(/í([sn])$/i, 'i\1es')
inflect.plural(/ó([sn])$/i, 'o\1es')
inflect.plural(/ú([sn])$/i, 'u\1es')