title: Rails: Sending params to Create method with devise Rails 4
body: <p>I am trying to pass in params from user#new to user#create with devise and rails 4, but I can't figure it out. I just want to get @invitation so I can edit it after user is created.</p>
  
  <pre><code>class RegistrationsController &lt; Devise::RegistrationsController
  
    def new
      @invitation = Invitation.find_by_invite_token(params[:invite_token])
      redirect_to root_url if @invitation.nil
      super 
    end
  
    def create
      @invitation = Invitation.find_by_invite_token(params[:invite_token])
  
      # Devise create stuff:
      build_resource(sign_up_params)
      if resource.save
        if resource.active_for_authentication?
          set_flash_message :notice, :signed_up if is_navigational_format?
          respond_with resource, :location =&gt; after_sign_up_path_for(resource)
        else
          ...
  </code></pre>
  
  <p><strong>@invitation is nil in user#create</strong></p>