Update customers_controller.rb

This commit is contained in:
2016-09-19 07:57:49 -04:00
committed by GitHub
parent 515b8feff7
commit b4d6fc55ea

View File

@@ -105,6 +105,9 @@ class CustomersController < ApplicationController
# Customer view for an issue
def view
User.current = User.find_by lastname: 'Anonymous'
@token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now)
@token = @token.first
if @token