summaryrefslogtreecommitdiff
path: root/help/app/controllers/tickets_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-11-15 11:53:21 +0100
committerAzul <azul@leap.se>2013-11-15 11:53:21 +0100
commit8b49ee15466b728213ec7f8bd4c8462876625acf (patch)
treec301a8033650a1067c9caf012669d1a47d6f2a0c /help/app/controllers/tickets_controller.rb
parent7e93258f552d6fd1114626561e6393aa483228fe (diff)
parent7a107e0d38271e7103d3494e06d52f3434022f22 (diff)
Merge branch 'develop'
Diffstat (limited to 'help/app/controllers/tickets_controller.rb')
-rw-r--r--help/app/controllers/tickets_controller.rb11
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