diff options
author | jessib <jessib@leap.se> | 2013-01-24 09:51:01 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2013-01-24 09:51:01 -0800 |
commit | 4057fba83719687284a4fc5542d1d0cb6f1f86e9 (patch) | |
tree | 7c5dfc371c7d596a3a3676bad6b24c4d6c5ab43a | |
parent | c3165f4ff3bafda23d17d96a7148c05e5701e488 (diff) |
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)
-rw-r--r-- | help/app/controllers/tickets_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |