Update customers_controller.rb

This commit is contained in:
2016-09-02 10:40:15 -04:00
committed by GitHub
parent fd8b5c280c
commit 3d44bcb04d

View File

@@ -94,7 +94,7 @@ class CustomersController < ApplicationController
def view def view
token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now) token = CustomerToken.where("token = ? and expires_at > ?", params[:token], Time.now)
if token if token
render :partial => "issues/show", locals: [issue: Issue.find token.issue_id]#, :flash => {:notice => token.issue_id} @issue = Issue.find token.issue_id
else else
render :file => "public/401.html.erb", :status => :unauthorized, :layout =>true render :file => "public/401.html.erb", :status => :unauthorized, :layout =>true
end end