Fixed some major bugs with implications, cleaning up the cache

expiration process and adding some additional tests.

Cleaned up the unit tests.  They should all run cleanly with rake
test:units now.
This commit is contained in:
albert
2010-10-27 16:56:12 -04:00
parent 484ff696e2
commit 1c9d8c37c7
16 changed files with 214 additions and 104 deletions

View File

@@ -29,14 +29,14 @@ class WikiPage < ActiveRecord::Base
titled(title).select("title, id").first
end
def revert_to(version, reverter_id, reverter_ip_addr)
def revert_to(version)
self.title = version.title
self.body = version.body
self.is_locked = version.is_locked
end
def revert_to!(version, reverter_id, reverter_ip_addr)
revert_to(version, reverter_id, reverter_ip_addr)
def revert_to!(version)
revert_to(version)
save!
end