module Devise::Models::TokenAuthenticatable

def ensure_authentication_token!

Generate authentication token unless already exists and save the record.
def ensure_authentication_token!
  reset_authentication_token! if authentication_token.blank?
end