Sha256: be6c8bb71c3e0c769ac2d7b96da4814c29af4da241f2b723a27782c241eb9557
Contents?: true
Size: 541 Bytes
Versions: 6
Compression:
Stored size: 541 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
6 entries across 6 versions & 1 rubygems