Module: ActiveRecord::ActsAs::Migration::TableDefinition

Included in:
Table, ConnectionAdapters::TableDefinition
Defined in:
lib/active_record/acts_as/migration.rb

Instance Method Summary collapse

Instance Method Details

#actable(**options) ⇒ Object



5
6
7
8
9
# File 'lib/active_record/acts_as/migration.rb', line 5

def actable(**options)
  name = options.delete(:as) || :actable
  options[:polymorphic] = true
  references(name, **options)
end