From 4057fba83719687284a4fc5542d1d0cb6f1f86e9 Mon Sep 17 00:00:00 2001 From: jessib Date: Thu, 24 Jan 2013 09:51:01 -0800 Subject: Use ticket_url to get URL for unauthenticated ticket creation, and only flash that message if the ticket already has a flash[:message] (and thus was saved successfully) --- help/app/controllers/tickets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb index bab795a..d5a3da7 100644 --- a/help/app/controllers/tickets_controller.rb +++ b/help/app/controllers/tickets_controller.rb @@ -23,7 +23,7 @@ class TicketsController < ApplicationController flash[:notice] = 'Ticket was successfully created.' if @ticket.save # cannot set this until ticket has been saved, as @ticket.id will not be set - flash[:notice] += " " + t(:access_ticket_text, :full_url => request.protocol + request.host_with_port + ticket_path(@ticket.id)) if !logged_in? + flash[:notice] += " " + t(:access_ticket_text, :full_url => ticket_url(@ticket.id)) if !logged_in? and flash[:notice] respond_with(@ticket) end -- cgit v1.2.3