Sha256: 1cc1ce55fd4254cd278fd824238c0b883d2257dbcddbeae7f764ff7626cd6b19
Contents?: true
Size: 550 Bytes
Versions: 11
Compression:
Stored size: 550 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(@table_name, name, options) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems