diff options
author | jessib <jessib@riseup.net> | 2013-11-18 09:57:02 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-11-18 09:57:02 -0800 |
commit | ab2e014df85b7f931a717ed49d9b9678f6f1c5a0 (patch) | |
tree | 568a7e8cb47349431553ec5667dddcaaf57d206b /help/app/controllers/tickets_controller.rb | |
parent | 3104677b8d96cd4a118022267abc7bed818f8ddd (diff) | |
parent | 7a107e0d38271e7103d3494e06d52f3434022f22 (diff) |
Merge branch 'develop' into feature/rename_ticket_title_to_subject
Diffstat (limited to 'help/app/controllers/tickets_controller.rb')
-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 |