From 560eb039f4778257559395583e1233d052d44127 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 20 May 2014 13:50:32 +0200 Subject: flash_for with_errors option displays error messages --- engines/support/app/controllers/tickets_controller.rb | 2 +- engines/support/app/views/tickets/edit.html.haml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/support/app/controllers/tickets_controller.rb b/engines/support/app/controllers/tickets_controller.rb index 7b6a7a0..9c1a741 100644 --- a/engines/support/app/controllers/tickets_controller.rb +++ b/engines/support/app/controllers/tickets_controller.rb @@ -62,7 +62,7 @@ class TicketsController < ApplicationController @ticket.comments.last.private = false unless admin? end - flash_for @ticket + flash_for @ticket, with_errors: true @ticket.save respond_with @ticket, location: redirection_path end diff --git a/engines/support/app/views/tickets/edit.html.haml b/engines/support/app/views/tickets/edit.html.haml index 99afa2a..03bda7d 100644 --- a/engines/support/app/views/tickets/edit.html.haml +++ b/engines/support/app/views/tickets/edit.html.haml @@ -1,4 +1,5 @@ - @show_navigation = params[:user_id].present? +- @comment = TicketComment.new .ticket = render 'tickets/edit_form' -- cgit v1.2.3