[LRUG] Better idiom for this?
Michael Pavling
pavling at gmail.com
Thu Feb 28 04:10:02 PST 2013
On 28 February 2013 11:56, Ash Berlin <ash_lrug at firemirror.com> wrote:
> 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.)
>
Oh yes... I'd long forgotten about that... that should tidy up a bit by
removing the the map and ternary.
Cheers,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130228/abeacc7a/attachment-0003.html>
More information about the Chat
mailing list