Sha256: 846cf5a6441fc143acf645f8468669db9e7a899549a384e74c349ba0b486224c

Contents?: true

Size: 562 Bytes

Versions: 3

Compression:

Stored size: 562 Bytes

Contents

module Nyauth
  class ConfirmationsController < ApplicationController
    include Nyauth::ControllerConcern
    allow_everyone
    self.responder = ConfirmationResponder
    respond_to :html, :json
    before_action :set_client

    def update
      @client.confirm
      respond_with(@client, location: Nyauth.configuration.redirect_path_after_update_confirmation.call(nyauth_client_name) || main_app.root_path)
    end

    private

    def set_client
      @client = nyauth_client_class.find_by!(confirmation_key: params[:confirmation_key])
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nyauth-0.5.0 app/controllers/nyauth/confirmations_controller.rb
nyauth-0.4.0 app/controllers/nyauth/confirmations_controller.rb
nyauth-0.3.0 app/controllers/nyauth/confirmations_controller.rb