Skip to content

Instantly share code, notes, and snippets.

@warrenlalata
Last active July 11, 2020 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warrenlalata/234172b2bb19fb0c7ae285c3b5b7986a to your computer and use it in GitHub Desktop.
Save warrenlalata/234172b2bb19fb0c7ae285c3b5b7986a to your computer and use it in GitHub Desktop.
gem "devise_custom_authenticatable"
devise :custom_authenticatable,
:database_authenticatable,
:registerable,
:recoverable,
:rememberable,
:validatable
def valid_for_custom_authenticatable?(password)
self.has_role?(:admin)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment