class PracticalErrors::ErrorAdvisers::ActiveRecord::RecordNotUnique
Public Class Methods
advise(exception)
click to toggle source
# File lib/practical_errors/error_advisers/active_record/record_not_unique.rb, line 5 def self.advise(exception) <<-EOS.strip_heredoc The column included in the record that you were about to insert or update, is not allowed duplicated value. This error was detected by database, not Rails. You might have configured uniqueness validation to this column, but uniqueness validation is not panacea. In race condition, uniqueness validation was passed easily. For more detail, see rails document http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of EOS end