title: Problem with Devise to add email confirmation
body: <p>I want to add email confirmation in my rails app with Devise. I got this error message:</p>
  <blockquote>
  <p>&quot;NoMethodError in Devise::RegistrationsController#create
  undefined method `confirmation_instructions' for MailForm::Base:Class&quot;</p>
  </blockquote>
  <p><img src="https://i.stack.imgur.com/IdKyS.png" alt="enter image description here" /></p>
  <p><strong>schema.rb</strong></p>
  <pre><code>create_table &quot;users&quot;, force: :cascade do |t|
      t.string &quot;email&quot;, default: &quot;&quot;, null: false
      t.string &quot;encrypted_password&quot;, default: &quot;&quot;, null: false
      t.string &quot;reset_password_token&quot;
      t.datetime &quot;reset_password_sent_at&quot;
      t.datetime &quot;remember_created_at&quot;
      t.datetime &quot;created_at&quot;, null: false
      t.datetime &quot;updated_at&quot;, null: false
      t.string &quot;username&quot;
      t.string &quot;first_name&quot;
      t.string &quot;last_name&quot;
      t.float &quot;latitude&quot;
      t.float &quot;longitude&quot;
      t.boolean &quot;admin&quot;, default: false
      t.string &quot;confirmation_token&quot;
      t.datetime &quot;confirmed_at&quot;
      t.datetime &quot;confirmation_sent_at&quot;
      t.string &quot;unconfirmed_email&quot;
      t.index [&quot;email&quot;], name: &quot;index_users_on_email&quot;, unique: true
      t.index [&quot;reset_password_token&quot;], name: &quot;index_users_on_reset_password_token&quot;, unique: true
    end
  </code></pre>
  <p><strong>user.rb</strong></p>
  <pre><code>class User &lt; ApplicationRecord
  
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :validatable, :confirmable
  end
  </code></pre>
  <p><strong>routes.rb</strong></p>
  <pre><code>Rails.application.routes.draw do
    devise_for :users
  
    resources :users do
      member do
        get :confirm_email
      end
    end
  </code></pre>
  <p><strong>devise.rb</strong></p>
  <pre><code>Devise.setup do |config|
  config.mailer_sender = 'my_email@gmail.com'
  
    #mail_form
    config.mailer = 'MailForm::Base'
  end
  </code></pre>
  <p><strong>development.rb</strong></p>
  <pre><code>  config.action_mailer.default_url_options = { host: &quot;https://myapp.com&quot; }
    config.action_mailer.perform_deliveries = true
    config.action_mailer.raise_delivery_errors = true
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
      address: 'smtp.gmail.com',
      port: 587,
      domain: 'gmail.com',
      authentication: 'plain',
      enable_starttls_auto: true,
      user_name: ENV['GMAIL_EMAIL'],
      password: ENV['GMAIL_PASSWORD']
    }
  </code></pre>
  <p><strong>production.rb</strong></p>
  <pre><code>config.action_mailer_default_url_options = { host: 'https://myapp.com' }
    Rails.application.routes.default_url_options[:host] = 'https://myapp.com'
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.perform_deliveries = true
    config.action_mailer.raise_delivery_errors = false
    config.action_mailer.default charset: 'utf-8'
    config.action_mailer.smtp_settings = {
      address: 'smtp.gmail.com',
      port: 587,
      domain: 'gmail.com',
      authentication: 'plain',
      enable_starttls_auto: true,
      user_name: ENV['GMAIL_EMAIL'],
      password: ENV['GMAIL_PASSWORD']
    }
  </code></pre>
  <p>Is this because mail_form gem for contact form? Should I create <code>RegistrationController</code>? Can anyone guess the main problem here?</p>