diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 991af0154..b54d98b8f 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -129,6 +129,7 @@ class ForumsController < ApplicationController format.html { redirect_to @forum, notice: l(:label_forum_create_succ) } format.json { render json: @forum, status: :created, location: @forum } else + flash.now[:error] = "#{l :label_forum_create_fail}: #{@forum.errors.full_messages[0]}" format.html { render action: "new" } format.json { render json: @forum.errors, status: :unprocessable_entity } end diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index b14df7b11..f67aa1181 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -3,15 +3,15 @@