/ Published in: Rails
Use rescue_from ActiveRecord::RecordNotUnique when DB transaction fail on uniqueness check
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
rescue_from ActiveRecord::RecordNotUnique, :with => :my_rescue_method .... protected def my_rescue_method ... end