标签: ruby-on-rails activerecord
目前,我有一个范围定义如下,以查询模型或其子模型已更新的所有记录:
scope :updated_after, ->(time) { joins(:nested_resources).where("resources.updated_at > ? OR nested_resources.updated_at > ?", time, time) }
有更简单的方法吗?