require 'rubygems'
require 'active_record'
class ActiveRecord::Base
class << self
def method_missing_with_lol(sym)
if sym.to_s =~ /^can_haz_(\w+)?/
send "acts_as_#{$1}"
else
method_missing_without_lol sym
end
end
alias_method_chain :method_missing, :lol
end
end
class Lulz < ActiveRecord::Base
can_haz_state_machine?
end
Temporary solution for Aaron’s problem, anyway.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.