Last active
November 6, 2022 22:28
-
-
Save apaciuk/a1c66c4bcc2bcdabb23613c1b24bb700 to your computer and use it in GitHub Desktop.
arel_table active record
This file contains hidden or 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
| user_is_admin = AdminUser.arel_table | |
| admin ||= AdminUser.all.where(user_is_admin[:email].eq(User.email).to_sql) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment