Created
March 8, 2012 19:44
-
-
Save jswanner/2002935 to your computer and use it in GitHub Desktop.
Unique table alias names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terms = ['asdf', 'ghjk'] | |
alias_numbers = (1..terms.length).to_a | |
tags = Tags.arel_table.alias "tags_#{alias_numbers.shift}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment