From db758bcc770cf4e58937108fe18eefc447d09b42 Mon Sep 17 00:00:00 2001 From: jessib Date: Wed, 14 Nov 2012 14:27:15 -0800 Subject: Improvements to functional ticket tests. --- help/app/controllers/tickets_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'help/app') diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb index 102464a..2dc4c4c 100644 --- a/help/app/controllers/tickets_controller.rb +++ b/help/app/controllers/tickets_controller.rb @@ -12,7 +12,7 @@ class TicketsController < ApplicationController def create @ticket = Ticket.new(params[:ticket]) - if current_user + if logged_in? @ticket.created_by = current_user.id @ticket.email = current_user.email if current_user.email @ticket.comments.last.posted_by = current_user.id @@ -48,7 +48,7 @@ class TicketsController < ApplicationController def update @ticket = Ticket.find(params[:id]) - + if !ticket_access_denied? if status = params[:change_status] #close or open button was pressed @ticket.close if params[:change_status] == 'close' -- cgit v1.2.3