You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2025. It is now read-only.
I'm getting an error while using this gem when saving a model with built associations.
#<ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
An example would be:
user = User.new(some: attrs)
user.build_profile(some: attrs)
user.save
(not real but communicating the scenario of a has_one being built)
rescue_unique_constraint is on both the association (profile) and primary model (user) but the failure in this scenario is stemmed from the uniqueness failure on the association (profile).
Has anybody ran into this before? Any suggestions?
Wondering if the rescue in the gem for the unique constraint should also re-raise with ActiveRecord::Rollback if ActiveRecord::Base.connection.open_transactions.positive? is true?