Skip to content

Instantly share code, notes, and snippets.

@tom025
Created December 15, 2011 17:30
Show Gist options
  • Save tom025/1481980 to your computer and use it in GitHub Desktop.
Save tom025/1481980 to your computer and use it in GitHub Desktop.
Grabbing errors from nested objects from an ActiveRecord::ValidationError
e.record.errors.each_error {|key, err| e.record.send(key).map{|attr| pp "#{key}: #{attr.errors.full_messages}" } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment