Show some approaches for handling constraints and validations, using both the Elixir Phoenix framework and Ruby on Rails.
With ActiveRecord, detecting conflicting data via validations is straightforward, but handling constraint errors is not.
With Ecto, detecting conflicting data via constraints is straightforward, but catching conflicts early with validations is not.
The two apps in this repo show ways of working around the shortcomings of each.