From 9cfab7bea1fb8bf92510f589de3ef08c23f42a98 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 19 Sep 2016 22:44:52 -0400 Subject: [PATCH] Update invoice_controller.rb --- app/controllers/invoice_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/invoice_controller.rb b/app/controllers/invoice_controller.rb index c844611..3d4be1c 100644 --- a/app/controllers/invoice_controller.rb +++ b/app/controllers/invoice_controller.rb @@ -13,11 +13,7 @@ class InvoiceController < ApplicationController include AuthHelper before_filter :require_user - skip_before_filter :verify_authenticity_token, :check_if_login_required, :only => [:show] if authorized - - def self.authorized - session[:token].nil? - end + skip_before_filter :verify_authenticity_token, :check_if_login_required, :only => [:show], :if -> { session[:token] } # # Downloads and forwards the invoice pdf