app/controllers/application_controller.rb
def email_confirmed_required
    if !current_user.confirmed?
      redirect_to new_users_confirmation_path(return_to: (request.fullpath if request.get?))
    end
  end
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def email_confirmed_required
    if !current_user.confirmed?
      redirect_to new_users_confirmation_path(return_to: (request.fullpath if request.get?))
    end
  end
def email_confirmed_required if ! current_user . confirmed? redirect_to new_users_confirmation_path ( return_to : ( request . fullpath if request . get? ) ) end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .