Generated by trace_location at 2019-06-08 01:19:34 +0900
vendor/bundle/gems/activerecord-5.2.3/lib/active_record/validations.rb:65
def valid?(context = nil)
context ||= default_validation_context
output = super(context)
errors.empty? && output
end
# called from (irb):5
vendor/bundle/gems/activerecord-5.2.3/lib/active_record/validations.rb:75
def default_validation_context
new_record? ? :create : :update
end
# called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/validations.rb:66
vendor/bundle/gems/activerecord-5.2.3/lib/active_record/persistence.rb:231
def new_record?
sync_with_transaction_state
@new_record
end
# called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/validations.rb:76
vendor/bundle/gems/activerecord-5.2.3/lib/active_record/transactions.rb:490
def sync_with_transaction_state
update_attributes_from_transaction_state(@transaction_state)
end
# called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/persistence.rb:232
vendor/bundle/gems/activerecord-5.2.3/lib/active_record/transactions.rb:494
def update_attributes_from_transaction_state(transaction_state)
if transaction_state && transaction_state.finalized?
restore_transaction_record_state(transaction_state.fully_rolledback?) if transaction_state.rolledback?
force_clear_transaction_record_state if transaction_state.fully_committed?
clear_transaction_record_state if transaction_state.fully_completed?
end
end
# called from vendor/bundle/gems/activerecord-5.2.3/lib/active_record/transactions.rb:491