I have an Array of Objects how to check if any one of them is ActiveRecord or not ?
You can check with:
array.any? { |obj| obj.is_a?(ActiveRecord::Base) }
You can check
object.is_a?(ActiveRecord::Base)
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