diff options
author | Azul <azul@leap.se> | 2014-04-22 14:40:27 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-04-24 20:36:11 +0200 |
commit | c5c54ec2035813949a81e8b5977a8f2538897260 (patch) | |
tree | b1e4f3680a4bc8f49ef2f4c050cc307872a4bd4b /engines/support | |
parent | c275f43147e7a8ab54623bdc5b9a8124b8592330 (diff) |
let's only add the flash notice if the ticket has been created
Diffstat (limited to 'engines/support')
-rw-r--r-- | engines/support/app/controllers/tickets_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/support/app/controllers/tickets_controller.rb b/engines/support/app/controllers/tickets_controller.rb index d65ee43..4be3493 100644 --- a/engines/support/app/controllers/tickets_controller.rb +++ b/engines/support/app/controllers/tickets_controller.rb @@ -24,11 +24,11 @@ class TicketsController < ApplicationController if @ticket.save flash[:notice] = t(:thing_was_successfully_created, :thing => t(:ticket)) - end - # cannot set this until ticket has been saved, as @ticket.id will not be set - if !logged_in? and flash[:notice] - flash[:notice] += " " + t(:access_ticket_text, :full_url => ticket_url(@ticket.id)) + # cannot set this until ticket has been saved, as @ticket.id will not be set + if !logged_in? and flash[:notice] + flash[:notice] += " " + t(:access_ticket_text, :full_url => ticket_url(@ticket.id)) + end end respond_with(@ticket, :location => auto_ticket_path(@ticket)) end |