Use configured timestamp field.

This commit is contained in:
Andy Stewart 2012-03-12 14:02:18 +01:00
parent e38a34a494
commit 699e53acf2
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ module PaperTrail
# Returns the objects (not Versions) as they were between the given times.
def versions_between(start_time, end_time, reify_options={})
versions = send(self.class.versions_association_name).between(start_time, end_time)
versions.collect{ |version| version_at(version.created_at) }
versions.collect { |version| version_at(version.send PaperTrail.timestamp_field) }
end
# Returns the object (not a Version) as it was most recently.