summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-11-12 02:04:31 -0800
committerazul <azul@riseup.net>2013-11-12 02:04:31 -0800
commita976436d6c022b5a1d142a931ba0bf6d27a00e9c (patch)
treeb45b2670f267a4099ae645c0b5ea413ed516025e
parentd4d970095d0370d7d5744fdc0ebc7b8d9bbd1a4c (diff)
parentd70161b55e37e0d9e7a23ed7dbac4ea6d323971a (diff)
Merge pull request #111 from jessib/bugfix/4453_missing_template
Maybe not ideal fix, but since there is no edit view, we want to show th...
-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