Feature request: union relations and SQL strings
Jeff-Hostetler opened this issue · comments
I recently needed this and thought the project might want something like dis. Idea is for this to work;
User.new(id: 1).posts.union("SELECT * FROM posts WHERE created_at > now()")
I'd be happy to work on it if you think it valuable.
Why not:
User.new(id: 1).posts.union(Post.where("created_at > now()"))