Sha256: 571ce7946ef67050637d5683b251489311d997240058913b0fdd48282ffc9019
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
module Users class EmailsController < ActionController::Base def show token = params[:token] user = User.confirm_email_by_token(token) if user.errors.blank? response.headers['X-Email-Confirmation-Message'] = I18n.t("shieldify.controllers.emails.confirmation.success_messages") response.headers['X-Email-Confirmation-Status'] = 'success' else response.headers['X-Email-Confirmation-Message'] = user.errors.full_messages.last response.headers['X-Email-Confirmation-Status'] = 'error' end redirect_to(Shieldify::Configuration.before_confirmation_url, allow_other_host: true) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shieldify-0.2.0.pre.alpha | app/controllers/users/emails_controller.rb |