How can I handle ActiveRecord::RecordNotUnique exception in the controller? Thanks
ActiveRecord::RecordNotUnique
Edit: I\'m getting that exception when generating an
begin # do stuff rescue ActiveRecord::RecordNotUnique # handle the exception however you want to end
http://ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html
You could also use rescue_from if it's something you need to deal with often.