-
-
Save robins35/8e20263ad98243a0d9edbfc2fe8f8370 to your computer and use it in GitHub Desktop.
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
>> gu = GlobalUser.find 4205; | |
?> gu.receive_direct_message_alerts # See it's set to false | |
=> false | |
>> gu.staff.first.is_admin? # They are not an admin | |
=> false | |
>> gu.receive_direct_message_alerts = true # Therefore this should return false, but it prints true | |
=> true |
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
def receive_direct_message_alerts=(flag) | |
staff.first.is_admin? && super(flag) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment