Or can you override active_for_authentication ? method in your user model
def active_for_authentication? super && (test your dates here) end
If it is inactive, it generates a flash message stating that the account is inactive. If you want something else, for example, "This user has not been activated yet," change the :inactive parameter in the config/locales/devise.en.yml . This is taken mainly from the Develop wiki .
source share