Sha256: 593294f2f2781b1ace1c2d4eaf99a4a91915fba41d3f095ebde3f243f210cd6f
Contents?: true
Size: 543 Bytes
Versions: 25
Compression:
Stored size: 543 Bytes
Contents
module ActiveRecord module ActsAs module Migration module TableDefinition def actable(options = {}) name = options.delete(:as) || :actable options[:polymorphic] = true references(name, options) end end module Table include TableDefinition def remove_actable(options = {}) name = options.delete(:as) || :actable options[:polymorphic] = true @base.remove_reference(@name, name, options) end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems