Thank you for the feature proposal. It doesn't seem to be difficult to
implement this as a gem given most of the APIs you need in able to
implement something like this are public.

What do you think about implementing this first as a gem and see if there
are adoption of this feature before proposing adding to the rails framework?

Thanks.

Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca


On Tue, Jan 15, 2019 at 7:12 PM Daniel Heath <daniel.r.he...@gmail.com>
wrote:

> I'd like to be able to use my ActiveRecord scopes in a CTE for another
> scope.
>
> Proposed syntax
>
>
> class Post < ActiveRecord::Base
> has_many :comments
> end
>
> class Comment < ActiveRecord::Base
> belongs_to :post
> end
>
> Post.with(Comment.select(:post_id), name: :post_ids, recursive:
> false).where(id: {post_ids: :post_id})
>
>
>
>
>
>
>
>
>
>
>
>
>
> Would a patch supporting this syntax be accepted?
>
> Thanks,
>
> Daniel Heath
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-core+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> Visit this group at https://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to