You can try this
@user.skip_confirmation!
@user.save
Call skip_confirmation! before saving the user record.
To skip the confirmation notification only you can use skip_confirmation_notification!
@user.skip_confirmation_notification!
@user.save
Hope this helps!
In Addition
if you wish to skip confirmation on the same line without creating a variable and you do not need to confirm that particular User, for example in seeds.rb:
User.create(email: "#{role_name}@example.com",
password: 'password',
password_confirmation: 'password',
confirmed_at: Time.now.utc, # skip confirmation)
or
If you just want to override the default email template, then you can run
rails generate devise:views -v registrations confirmations
It will generate the default views for confirmations then you can override it according to your need.