@@ -66,7 +66,10 class WikiController < ApplicationController | |||
|
66 | 66 | @content.text = "h1. #{@page.pretty_title}" if @content.text.blank? |
|
67 | 67 | # don't keep previous comment |
|
68 | 68 | @content.comments = nil |
|
69 |
if request. |
|
|
69 | if request.get? | |
|
70 | # To prevent StaleObjectError exception when reverting to a previous version | |
|
71 | @content.version = @page.content.version | |
|
72 | else | |
|
70 | 73 | if !@page.new_record? && @content.text == params[:content][:text] |
|
71 | 74 | # don't save if text wasn't changed |
|
72 | 75 | redirect_to :action => 'index', :id => @project, :page => @page.title |
General Comments 0
You need to be logged in to leave comments.
Login now