I'm using ruby-on-rails-5 with devise and devise-token-auth.
I did this in my user model and it worked fine:
before_create :skip_confirmation!
# Include default devise modules.
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
I was able to create accounts, which got confirmed automatically. For other stuff I needed to change the timezone of the application by adding the following to my application.rb.
config.time_zone = 'Europe/Berlin'
config.active_record.default_timezone = 'Europe/Berlin'
The time zone stuff works as well, but for unknown reasons, creating users stopped. If I create one and try to login, this error occurs:
A confirmation email was sent to your account at '...'. You must follow the instructions in the email before your account can be activated
In my database after creating an account with the new time zones every timestamp value for the user record was inserted correctly (using the new time zones).
How can I fix this?