Method: ActsAsTable::ForeignKey#values

Defined in:
app/models/acts_as_table/foreign_key.rb

#valuesActiveRecord::Relation<ActsAsTable::Value>

Returns the ActsAsTable values that have been provided by this ActsAsTable foreign key.

Returns:

See Also:



57
58
59
60
61
62
63
64
# File 'app/models/acts_as_table/foreign_key.rb', line 57

has_many :values, **{
  as: :value_provider,
  class_name: 'ActsAsTable::Value',
  dependent: :restrict_with_exception,
  foreign_key: 'value_provider_id',
  foreign_type: 'value_provider_type',
  inverse_of: :value_provider,
}