Update customers_controller.rb

This commit is contained in:
2016-09-16 23:03:07 -04:00
committed by GitHub
parent 9dda339a32
commit 80fb296e24

View File

@@ -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).