Sha256: 73c3daa6dcb701b39ac052c4b41553782ad7e6a1532a0220a59d82f35a7f8cde
Contents?: true
Size: 681 Bytes
Versions: 2
Compression:
Stored size: 681 Bytes
Contents
class EmailConfirmationController < ApplicationController before_filter :require_token respond_to :html def show if @user.email_confirmed login(@user) flash[:notice] = "Thanks for confirming your email address" respond_to do |format| format.json { head :no_content } format.html { redirect_to root_path } end else respond_to do |format| format.json { render json: { status: 'error', errors: @user.errors }.to_json, status: 422 } format.html { flash[:error] = "Could not confirm email address because it is already in use" redirect_to root_path } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems