diff options
author | Azul <azul@leap.se> | 2013-11-15 11:53:21 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-11-15 11:53:21 +0100 |
commit | 8b49ee15466b728213ec7f8bd4c8462876625acf (patch) | |
tree | c301a8033650a1067c9caf012669d1a47d6f2a0c /help/app/controllers | |
parent | 7e93258f552d6fd1114626561e6393aa483228fe (diff) | |
parent | 7a107e0d38271e7103d3494e06d52f3434022f22 (diff) |
Merge branch 'develop'
Diffstat (limited to 'help/app/controllers')
-rw-r--r-- | help/app/controllers/tickets_controller.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/help/app/controllers/tickets_controller.rb b/help/app/controllers/tickets_controller.rb index a669e19..c193ff4 100644 --- a/help/app/controllers/tickets_controller.rb +++ b/help/app/controllers/tickets_controller.rb @@ -62,14 +62,11 @@ class TicketsController < ApplicationController @ticket.comments.last.private = false unless admin? end - if @ticket.changed? - if @ticket.save - flash[:notice] = t(:changes_saved) - redirect_to_tickets - else - respond_with @ticket - end + if @ticket.changed? and @ticket.save + flash[:notice] = t(:changes_saved) + redirect_to_tickets else + flash[:error] = @ticket.errors.full_messages.join(". ") if @ticket.changed? redirect_to auto_ticket_path(@ticket) end end |