Rails 3: Handle ActiveRecord::RecordNotUnique Exception

后端 未结 3 1770
臣服心动
臣服心动 2020-12-28 18:31

How can I handle ActiveRecord::RecordNotUnique exception in the controller? Thanks

Edit: I\'m getting that exception when generating an

3条回答
  •  甜味超标
    2020-12-28 18:41

    Using this validation method validate_uniqueness_of does not guarantee the absence of duplicate record insertions.

    You should look here

提交回复
热议问题