def acts_as_taggable(options = {})
  write_inheritable_attribute(:acts_as_taggable_options, {
    :taggable_type => ActiveRecord::Base.\
            send(:class_name_of_active_record_descendant, self).to_s,
    :from => options[:from]
  })
  
  class_inheritable_reader :acts_as_taggable_options

  has_many :taggings, :as => :taggable, :dependent => true
  has_many :tags, :through => :taggings

  include ActiveRecord::Acts::Taggable::InstanceMethods
  extend ActiveRecord::Acts::Taggable::SingletonMethods          
end