On Jan 11, 1:37 pm, Jeffrey Reinecke <[email protected]> wrote:
> As a note, I did figure out the long way to do it:
>
> expr = Sequel::SQL::BooleanExpression.from_value_pairs({:primary_office_id => 
> ids, :secondary_office_id => ids}, :OR)
> ds.filter(:active => true).filter(expr)
>
> This is not ideal, but it at least works.  Anyone got a better idea?

ds.filter({:active => true} & ({:primary_office_id => ids} |
{:secondary_office_id => ids}))
ds.filter(:active => true).filter({:primary_office_id =>
ids, :secondary_office_id => ids}.sql_or)

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