Last active
November 6, 2022 22:28
-
-
Save apaciuk/a1c66c4bcc2bcdabb23613c1b24bb700 to your computer and use it in GitHub Desktop.
Revisions
-
apaciuk revised this gist
Nov 6, 2022 . No changes.There are no files selected for viewing
-
apaciuk created this gist
Nov 6, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ user_is_admin = AdminUser.arel_table admin ||= AdminUser.all.where(user_is_admin[:email].eq(User.email).to_sql)