fix wiki content specs

This commit is contained in:
Tim Felgentreff 2010-09-14 16:59:43 +02:00
parent 68ca0636c4
commit d1ba27358a
1 changed files with 14 additions and 14 deletions

View File

@ -53,6 +53,20 @@ class WikiContent < ActiveRecord::Base
notified.collect(&:mail)
end
# FIXME: Deprecate
def versions
journals
end
def version
unless last_journal
# FIXME: This is code that caters for a case that should never happen in the normal code paths!!
create_journal
last_journal.update_attribute(:created_at, updated_on)
end
last_journal.version
end
# FIXME: This is for backwards compatibility only. Remove once we decide it is not needed anymore
WikiContentJournal.class_eval do
attr_protected :data
@ -104,19 +118,5 @@ class WikiContent < ActiveRecord::Base
def versioned
journaled
end
# FIXME: Deprecate
def versions
journals
end
def version
unless last_journal
# FIXME: This is code that caters for a case that should never happen in the normal code paths!!
update_journal
last_journal.update_attribute(:created_at, updated_on)
end
last_journal.version
end
end
end