Skip to content

Instantly share code, notes, and snippets.

@rondy rondy/gist:2026070

Created Mar 13, 2012
What would you like to do?
:select => ", articles.title,",
:joins => "INNER JOIN slugs
ON slugs.sluggable_type = 'Article' AND
slugs.sluggable_id = AND = (SELECT id
FROM slugs
WHERE slugs.sluggable_type = 'Article' AND
slugs.sluggable_id =
ORDER BY slugs.created_at DESC
LIMIT 1)")

This comment has been minimized.

Copy link

fabioyamate commented Mar 13, 2012

oh yeah, subselects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.