This mixin is injected into the dynamically generated Revision class. You can customize this in your application to store extra fields per revision.

Methods
Attributes
[RW] create_time The create time for the revision.
Public Class methods
new(obj, options = {})

Override to handle your options.

    # File lib/og/model/revisable.rb, line 40
40:     def initialize obj, options = {}
41:       revision_from(obj)
42:       @create_time = Time.now
43:     end
Public Instance methods
apply_to(obj)

Alias for #revision_to

revision_from(obj)
    # File lib/og/model/revisable.rb, line 45
45:     def revision_from obj
46:       for a in obj.class.serializable_attributes
47:         unless a == obj.class.primary_key
48:           instance_variable_set "@#{a}", obj.send(a.to_s)
49:         end
50:       end
51:     end
revision_to(obj)
This method is also aliased as apply_to
    # File lib/og/model/revisable.rb, line 53
53:     def revision_to obj
54:       for a in obj.class.serializable_attributes
55:         unless a == obj.class.primary_key
56:           obj.instance_variable_set "@#{a}", self.send(a.to_s)
57:         end
58:       end
59:     end