There's an easy why that I don't remember to retrieve all invalid objects saved in the database from rails console.
Any idea how?
say your model is called Widget, then:
Widget.all.select(&:invalid?)
That's likely to be very slow if you have a lot of data, but you have to retrieve the records from the database if you want to check their validity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With