I have a User model with devise and have a active column which indicates if the user is active or not. After the trial period is over the account will be inactive unless the user sign up for one of the plans.
I am currently showing custom error message to the users when email already exists using devise like below
en:
activerecord:
errors:
models:
user:
attributes:
email:
taken: 'This email address has been used already. Please contact support if you would like more access'
However sometimes a user with active account in trial period tries to sign up again, in that case i want to display a different error message something like 'Please sign in __sign__in__link'
What would be proper way to display error message conditionally when email already exists and account is active?