summaryrefslogtreecommitdiffstats
path: root/app/controllers/wiki_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r--app/controllers/wiki_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index d8f23cfd1..f85c719bc 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -60,14 +60,18 @@ class WikiController < ApplicationController
redirect_to :action => 'index', :id => @project, :page => @page.title
return
end
- @content.text = params[:content][:text]
- @content.comments = params[:content][:comments]
+ #@content.text = params[:content][:text]
+ #@content.comments = params[:content][:comments]
+ @content.attributes = params[:content]
@content.author = logged_in_user
# if page is new @page.save will also save content, but not if page isn't a new record
if (@page.new_record? ? @page.save : @content.save)
redirect_to :action => 'index', :id => @project, :page => @page.title
end
end
+ rescue ActiveRecord::StaleObjectError
+ # Optimistic locking exception
+ flash[:notice] = l(:notice_locking_conflict)
end
# show page history