activerecord

change validation error from active record error view page to clean flash message

I found the following code at How do I validate members of an array field? . # Validates the values of an Enumerable with other validators. # Generates error messages that include the index and value of # invalid elements. # # Example: # # validates :values, enum: { presence: true, inclusion: { in:...