lib/rails_devs_for_data_integrity.rb
def add_unique_key_error( exception, columns = nil )
    columns ||= begin
      index = index_for_record_not_unique( exception )
      index.columns if index
    end
    add_errors_for_violation( :unique_key, columns )
  end
# Add a duplicate error message to errors based on the exception
Add a duplicate error message to errors based on the exception
Add a duplicate error message to errors based on the exception
def add_unique_key_error( exception, columns = nil )
    columns ||= begin
      index = index_for_record_not_unique( exception )
      index.columns if index
    end
    add_errors_for_violation( :unique_key, columns )
  end
def add_unique_key_error ( exception , columns = nil ) columns ||= begin index = index_for_record_not_unique ( exception ) index . columns if index end add_errors_for_violation ( :unique_key , columns ) end
Add a duplicate error message to errors based on the exception
Add a duplicate error message to errors based on the exception
exception
columns