[#633] Fix mock of WikiContent::Version for Ruby 1.9

This commit is contained in:
Holger Just 2011-10-04 11:12:33 +02:00
parent d467f79214
commit e7f69d4236
1 changed files with 5 additions and 4 deletions

View File

@ -12,12 +12,13 @@
#++
class MergeWikiVersionsWithJournals < ActiveRecord::Migration
def self.up
# This is provided here for migrating up after the WikiContent::Version class has been removed
unless WikiContent.const_defined?("Version")
WikiContent.const_set("Version", Class.new(ActiveRecord::Base))
# This is provided here for migrating up after the WikiContent::Version class has been removed
class WikiContent < ActiveRecord::Base
class Version < ActiveRecord::Base
end
end
def self.up
# avoid touching WikiContent on journal creation
WikiContentJournal.class_exec {
def touch_journaled_after_creation