lib/rails_devs_for_data_integrity.rb
def custom_error_message_for_violation( violation_type, columns )#:nodoc:
    options = send(
      "#{violation_type}_check_options"
    )[ columns.first.to_sym ] if columns.any?

    message = case options[:message]
      when Symbol then Il8n.translate( options[:message] )
      else options[:message]
    end unless options.blank?
  end
# Custom error messages set with handle_violation
Custom error messages set with handle_violation
Custom error messages set with handle_violation
def custom_error_message_for_violation( violation_type, columns )
    options = send(
      "#{violation_type}_check_options"
    )[ columns.first.to_sym ] if columns.any?
    message = case options[:message]
      when Symbol then Il8n.translate( options[:message] )
      else options[:message]
    end unless options.blank?
  end
def custom_error_message_for_violation ( violation_type , columns ) options = send ( "#{violation_type}_check_options" ) [ columns . first . to_sym ] if columns . any? message = case options [ :message ] when Symbol then Il8n . translate ( options [ :message ] ) else options [ :message ] end unless options . blank? end
Custom error messages set with handle_violation
Custom error messages set with handle_violation
#:nodoc:
violation_type
columns