Update customers_controller.rb

This commit is contained in:
2016-09-16 23:10:21 -04:00
committed by GitHub
parent b7152d6124
commit 226d44cd28

View File

@@ -106,8 +106,9 @@ class CustomersController < ApplicationController
# Customer view for an issue
def view
@token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now)
if @token.first
@issue = Issue.find @token.first.issue_id
@token = @token.first
if @token
@issue = Issue.find @token.issue_id
@journals = @issue.journals.
preload(:details).
preload(:user => :email_address).