Skip to content
Browse files

a couple small tweaks to the user versioning

  • Loading branch information...
1 parent cf1f9b5 commit 6adf02507f953a571916615c24e2d7685f504878 @adamcooper adamcooper committed Dec 18, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/vestal_versions/users.rb
View
7 lib/vestal_versions/users.rb
@@ -4,10 +4,14 @@ module VestalVersions
module Users
extend ActiveSupport::Concern
+ included do
+ attr_accessor :updated_by
+ Version.class_eval{ include VersionMethods }
+ end
+
# Methods added to versioned ActiveRecord::Base instances to enable versioning with additional
# user information.
module InstanceMethods
- attr_accessor :updated_by
private
# Overrides the +version_attributes+ method to include user information passed into the
@@ -47,6 +51,5 @@ def user_with_name=(value)
end
end
- Version.class_eval{ include VersionMethods }
end
end

0 comments on commit 6adf025

Please sign in to comment.
Something went wrong with that request. Please try again.