[#633] Fix mock of WikiContent::Version for Ruby 1.9
This commit is contained in:
parent
d467f79214
commit
e7f69d4236
|
@ -12,12 +12,13 @@
|
||||||
#++
|
#++
|
||||||
|
|
||||||
class MergeWikiVersionsWithJournals < ActiveRecord::Migration
|
class MergeWikiVersionsWithJournals < ActiveRecord::Migration
|
||||||
def self.up
|
# This is provided here for migrating up after the WikiContent::Version class has been removed
|
||||||
# This is provided here for migrating up after the WikiContent::Version class has been removed
|
class WikiContent < ActiveRecord::Base
|
||||||
unless WikiContent.const_defined?("Version")
|
class Version < ActiveRecord::Base
|
||||||
WikiContent.const_set("Version", Class.new(ActiveRecord::Base))
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.up
|
||||||
# avoid touching WikiContent on journal creation
|
# avoid touching WikiContent on journal creation
|
||||||
WikiContentJournal.class_exec {
|
WikiContentJournal.class_exec {
|
||||||
def touch_journaled_after_creation
|
def touch_journaled_after_creation
|
||||||
|
|
Loading…
Reference in New Issue