Only define :version accessor for AR::Base subclasses that call has_paper_trail.

This commit is contained in:
Emmanuel Gomez 2011-02-07 14:36:06 -08:00
parent ff8387a2cb
commit 2d530b0dae
1 changed files with 3 additions and 3 deletions

View File

@ -3,9 +3,6 @@ module PaperTrail
def self.included(base)
base.send :extend, ClassMethods
# The version this instance was reified from.
attr_accessor :version
end
@ -24,6 +21,9 @@ module PaperTrail
# any more ActiveRecord models than we have to.
send :include, InstanceMethods
# The version this instance was reified from.
attr_accessor :version
cattr_accessor :ignore
self.ignore = (options[:ignore] || []).map &:to_s