<div dir="ltr">On 28 February 2013 11:56, Ash Berlin <span dir="ltr"><<a href="mailto:ash_lrug@firemirror.com" target="_blank">ash_lrug@firemirror.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 style="word-wrap:break-word">ActiveRecord has a thing where you can pass an record into a condition and it automatically converts to the PK, using a method called something like 'to_param' (but can't remember the exact name.)<div>

</div></div></blockquote></div><br></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">Oh yes... I'd long forgotten about that... that should tidy up a bit by removing the the map and ternary. </span><br>

</div><div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:13px">Cheers,</span></div></div>