I have done this a few times:

ModelA.join(:model_b, ...).select("model_a.*".lit).all

when I want to filter via some second model, but only return the
results (and columns) from the first model.

Is there a more elegant way to do this than select("...".lit) ?

Shawn

-- 
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