Posted By

yaworsk on 01/21/15


Tagged

validation


Versions (?)

Rescuing From RecordNotUnique


 / Published in: Rails
 

Use rescue_from ActiveRecord::RecordNotUnique when DB transaction fail on uniqueness check

  1. rescue_from ActiveRecord::RecordNotUnique, :with => :my_rescue_method
  2. ....
  3. protected
  4. def my_rescue_method
  5. ...
  6. end

Report this snippet  

You need to login to post a comment.