I have a password policy need to apply at my ROR application.

Prohibit passwords from being the same as the account ID or user ID.

For example: System will prompt error if I use the wording contain of 'alex' if my username is 
alex@google.com