title: Log in user after accept invitation using rails with devise_invitable
body: <p>I use devise_invitable with Rails and need some help. I want make user logged in after accept invitation. Here is my InvitationsController</p>
  
  <pre><code>class InvitationsController &lt; Devise::InvitationsController
    def update
      if User.accept_invitation!(user_params)
        # log in user here
        redirect_to dashboard_show_path, notice: t('invitaion.accepted')
      else
        redirect_to root_path, error: t('invitation.not_accepted')
      end
    end
  
    private
    def user_params
      params.require(:user).permit(:invitation_token, :password, :password_confirmation)
    end
  end
  </code></pre>
  
  <p>You can see comment in code</p>
  
  <pre><code># log in user here
  </code></pre>
  
  <p>here I want log in the user who has accept the invitation.</p>
  
  <p>Thanks.</p>