Skip to content

Instantly share code, notes, and snippets.

View stagrlee's full-sized avatar

Lee Thompson stagrlee

View GitHub Profile
@anthonylewis
anthonylewis / callbacks.rb
Created July 18, 2013 04:17
An example using class instance variables
class Record
def self.before_save(*methods)
@callbacks ||= []
@callbacks += methods
end
def self.callbacks
@callbacks
end