|
|
@@ -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 |