This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in spec/watchr | |
# use with Spork | |
# run with `watchr spec/watchr` | |
# images are from Tango icon theme | |
# http://commons.wikimedia.org/wiki/Tango_icons#Weather | |
# for added bonus: | |
# set keyboard shortcuts Ctrl-Alt-S to run "pkill -USR2 -f spork" | |
# ...and Ctrl-Alt-T to run "pkill -USR2 -f watchr" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/user.rb | |
class User < ActiveRecord::Base | |
end | |
# lib/user_logger.rb | |
module UserLogger | |
def self.included(mod) | |
mod.send :after_create, :log_creation | |
end |