Sha256: bdb783111303d612cd373857b0dd5d158bfd844324a2010dbdd161fe4f830597
Contents?: true
Size: 544 Bytes
Versions: 2
Compression:
Stored size: 544 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_record-acts_as-2.0.1 | lib/active_record/acts_as/migration.rb |
active_record-acts_as-2.0.0 | lib/active_record/acts_as/migration.rb |