public
Description: ActiveRecord plugin for versioning your models.
Clone URL: git://github.com/technoweenie/acts_as_versioned.git
add extra LockedPage field so that it would save even if LockedPage#title 
had not updated
technoweenie (author)
Fri Oct 03 15:50:11 -0700 2008
commit  c310d2805ed243fd7587afcc5cec1bbbb9198947
tree    72dea9da58b73893f773084916c4ca0edd90d336
parent  7bac6796b22760aa17ebf879e5466e796f1b5110
...
30
31
32
 
33
34
35
...
37
38
39
 
40
41
42
...
30
31
32
33
34
35
36
...
38
39
40
41
42
43
44
0
@@ -30,6 +30,7 @@ ActiveRecord::Schema.define(:version => 0) do
0
   create_table :locked_pages, :force => true do |t|
0
     t.column :lock_version, :integer
0
     t.column :title, :string, :limit => 255
0
+ t.column :body, :text
0
     t.column :type, :string, :limit => 255
0
   end
0
 
0
@@ -37,6 +38,7 @@ ActiveRecord::Schema.define(:version => 0) do
0
     t.column :page_id, :integer
0
     t.column :lock_version, :integer
0
     t.column :title, :string, :limit => 255
0
+ t.column :body, :text
0
     t.column :version_type, :string, :limit => 255
0
     t.column :updated_at, :datetime
0
   end
...
225
226
227
228
 
229
230
231
...
225
226
227
 
228
229
230
231
0
@@ -225,7 +225,7 @@ class VersionedTest < Test::Unit::TestCase
0
     assert_equal 1, p.lock_version
0
     assert_equal 1, p.versions(true).size
0
 
0
- p.title = 'title'
0
+ p.body = 'whoa'
0
     assert !p.save_version?
0
     p.save
0
     assert_equal 2, p.lock_version # still increments version because of optimistic locking

Comments

    No one has commented yet.