Module: ActiveRecord::Bitemporal::Patches::SingularAssociation

Defined in:
lib/activerecord-bitemporal/patches.rb

Instance Method Summary collapse

Instance Method Details

#scope_for_createObject

MEMO: Except for primary_key in ActiveRecord

https://github.com/rails/rails/blob/6-0-stable/activerecord/lib/active_record/associations/singular_association.rb#L34-L36
excluding bitemporal_id_key


136
137
138
139
# File 'lib/activerecord-bitemporal/patches.rb', line 136

def scope_for_create
  return super unless klass&.bi_temporal_model?
  super.except!(klass.bitemporal_id_key)
end