On Aug 30, 6:54 pm, james <[email protected]> wrote:
> Hi,
>
> Is it possible to combine separate datasets with Sequel?  This is an
> example from Rails 3 scopes/Arel that I came across.
>
> class User < ActiveRecord::Base
>   scope :published, lambda {
>     joins(:posts).group("users.id") & Post.published
>   }
> end
>
> Or just:
> User.joins(:posts).group("users.id") & Post.published

I'm not sure what that does in AR.  If you show the SQL it produces, I
could probably show you how to do it in Sequel.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to