title: Send devise confirmation email manually later
body: <p>I have added <code>devise :confirmable</code> to my model and created a before_create to skip the confirmation.</p>
  
  <pre><code>before_create :skip_confirmation
  
  def skip_confirmation
    self.skip_confirmation!
  end
  </code></pre>
  
  <p>I have a mailer named store_mailer.rb along with appropriate views app/views/stores/mailer/confirmation_instroctions.html.erb to send out the confirmation email.</p>
  
  <pre><code>class StoreMailer &lt; Devise::Mailer
    helper :application # gives access to all helpers defined within `application_helper`.
    include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
    default template_path: 'store/mailer' # to make sure that your mailer uses the devise views
  end
  </code></pre>
  
  <p>confirmation_instroctions.html.erb</p>
  
  <pre><code>&lt;h2&gt;Resend confirmation instructions&lt;/h2&gt;
  
  &lt;%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %&gt;
    &lt;%= devise_error_messages! %&gt;
  
    &lt;div class="field"&gt;
      &lt;%= f.label :email %&gt;&lt;br /&gt;
      &lt;%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %&gt;
    &lt;/div&gt;
  
    &lt;div class="actions"&gt;
      &lt;%= f.submit "Resend confirmation instructions" %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  
  &lt;%= render "stores/shared/links" %&gt;
  </code></pre>
  
  <p>I'm trying to send the confirmation email with this:
  <code>StoreMailer.confirmation_instructions(@store).deliver</code></p>
  
  <p>But it returns the following error: <code>ArgumentError in TransactionsController#create
  wrong number of arguments (given 1, expected 2..3)</code></p>
  
  <p>Any ideas what might be wrong?</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>transaction_controlller.rb</p>
  
  <pre><code>def create
     nonce_from_the_client = params['payment_method_nonce']
     @result = Braintree::Customer.create(
      first_name: params['first_name'],
      last_name: params['last_name'],
      :payment_method_nonce =&gt; nonce_from_the_client
     )
  
     if @result.success?
       puts @result.customer.id
       puts @result.customer.payment_methods[0].token
       StoreMailer.confirmation_instructions(@store).deliver
       redirect_to showcase_index_path, notice: 'Subscribed, please check your inbox for confirmation'
  
     else
       redirect_back( fallback_location: (request.referer || root_path),
                   notice: "Something went wrong while processing your transaction. Please try again!")
     end
   end
  </code></pre>