<div dir="ltr">On 28 February 2013 12:26, Paul Battley <span dir="ltr"><<a href="mailto:pbattley@gmail.com" target="_blank">pbattley@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><span style="color:rgb(34,34,34)">Oh, and whatever you do, DON'T call the scope "except". You'll waste</span><br></div>
half a day wondering why composing scopes doesn't work as it ought.<br></blockquote><div><br></div><div style>After a bit of playing around, it's apparent that I don't need to delete blank elements either, so I've gone back to a scope, which currently looks like this:</div>

<div style><br></div><div style><div>  scope :excluding, lambda { |*objects| where(['id NOT IN (?)', (objects.flatten << 0)]) }</div><div><br></div><div style>Cheers for all the input :-)</div></div></div></div>

</div>