Class: AssignableValues::ActiveRecord::Restriction::BelongsToAssociation

Inherits:
Base
  • Object
show all
Defined in:
lib/assignable_values/active_record/restriction/belongs_to_association.rb

Instance Attribute Summary

Attributes inherited from Base

#default, #model, #options, #property, #secondary_default, #values

Instance Method Summary collapse

Methods inherited from Base

#assignable_values, #set_default, #validate_record

Constructor Details

#initializeBelongsToAssociation

Returns a new instance of BelongsToAssociation.



6
7
8
9
10
11
# File 'lib/assignable_values/active_record/restriction/belongs_to_association.rb', line 6

def initialize(*)
  super
  if @options[:multiple]
    raise "Option :multiple is not allowed for restricting belongs_to associations."
  end
end