stephskardal/piggybak — comment on commit e339d877def64a5f4cafd988f5a326feb1c81a18
File: lib/acts_as_variant/base.rb line 2
By drhenner:

Why not use the new ActiveSupport::Concern? It gives this stuff for free. http://guides.rubyonrails.org/plugins.html#add-an-acts_as-method-to-active-record

# yaffle/lib/yaffle/acts_as_yaffle.rb
module Yaffle
module ActsAsYaffle
extend ActiveSupport::Concern

included do
end

module ClassMethods
def acts_as_yaffle(options = {})
# your code will go here
end
end
end
end

ActiveRecord::Base.send :include, Yaffle::ActsAsYaffle