From 80fb296e24030caa92ab57595836c83d489e416e Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 16 Sep 2016 23:03:07 -0400 Subject: [PATCH] Update customers_controller.rb --- app/controllers/customers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/customers_controller.rb b/app/controllers/customers_controller.rb index 35f8c5d..5b74710 100644 --- a/app/controllers/customers_controller.rb +++ b/app/controllers/customers_controller.rb @@ -105,8 +105,8 @@ class CustomersController < ApplicationController # Customer view for an issue def view - token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now) - if token.first + @token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now) + if @token.first @issue = Issue.find token.first.issue_id @journals = @issue.journals. preload(:details).