Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Unique table alias names
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