|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
# added by fq
|
|
|
|
|
class ForumsController < ApplicationController
|
|
|
|
|
layout "users_base"
|
|
|
|
|
|
|
|
|
|
# GET /forums
|
|
|
|
|
# GET /forums.json
|
|
|
|
|
before_filter :find_forum_if_available
|
|
|
|
@ -143,9 +145,10 @@ class ForumsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
if @forum.update_attributes(params[:forum])
|
|
|
|
|
format.html { redirect_to @forum, notice: 'Forum was successfully updated.' }
|
|
|
|
|
format.html { redirect_to @forum, notice: l(:label_forum_update_succ) }
|
|
|
|
|
format.json { head :no_content }
|
|
|
|
|
else
|
|
|
|
|
flash.now[:error] = "#{l :label_forum_update_fail}: #{@forum.errors.full_messages[0]}"
|
|
|
|
|
format.html { render action: "edit" }
|
|
|
|
|
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
|
|
|
|
end
|
|
|
|
|