Currently, I have a scope defined as following to query all records where the model OR it's child model have been updated:
scope :updated_after, ->(time) {
joins(:nested_resources).where("resources.updated_at > ? OR nested_resources.updated_at > ?", time, time)
}
Is there a simpler way to do this?