title: Generating confirmation url in custom devise mailer
body: <p>I am using the Mandrill API to handle my transactional email for a variety of reasons. One issue I am encountering is generating the confirmation_url, edit_password_url and unlock_url in the new mailer. I am including Devise's URL helpers in the new mailer. Everything else in the email is being generated properly.</p>
  
  <p>I am getting the following error:</p>
  
  <pre><code>NoMethodError (undefined method `main_app' for #&lt;DeviseMailer:0x007f812b6abe78&gt;):
    app/mailers/devise_mailer.rb:15:in `confirmation_instructions'
    app/controllers/lenders/registrations_controller.rb:9:in `create'
  </code></pre>
  
  <p><strong>devise_mailer.rb</strong></p>
  
  <pre><code>class DeviseMailer &lt; MandrillMailer::TemplateMailer
    helper :application
    include Devise::Controllers::UrlHelpers
  
    default from: 'no-reply@test.com'
  
    def confirmation_instructions(record, token)
      mandrill_mail template: 'Confirmation Instructions',
                    subject:  'Confirm Email',
                    from_name: 'Test',
                    to: { email: record.email },
                    vars: {
                      'FNAME'                  =&gt; record.first_name,
                      'LIST_COMPANY'           =&gt; "Apples",
                      'HTML_LIST_ADDRESS_HTML' =&gt; "1 Infinite Loop",
                      'CONFIRMATION_LINK'      =&gt; confirmation_url(record, :confirmation_token =&gt; token)
                    }
    end
  end
  </code></pre>
  
  <p>Thank you for the help</p>