Sha256: 6ee471c50ac17f6b205df8f817a93207979e565e2901f16238f480449ed42ad4

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

module Users
  class EmailsController < ActionController::Base
    def show
      token = params[:token]
      user = User.confirm_email_by_token(token)

      if user.errors.blank?
        render(
          json: { message: I18n.t("shieldify.controllers.emails.confirmation.success_messages") },
          status: :ok
        )
      else
        render json: { errors: user.errors.full_messages }, status: :unprocessable_entity
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shieldify-0.1.2.pre.alpha app/controllers/users/emails_controller.rb
shieldify-0.1.1.pre.alpha app/controllers/users/emails_controller.rb
shieldify-0.1.0.pre.alpha app/controllers/users/emails_controller.rb