public
Description: ActiveRecord plugin for versioning your models.
Clone URL: git://github.com/technoweenie/acts_as_versioned.git
updated changelog and version

git-svn-id: 
http://svn.techno-weenie.net/projects/plugins/acts_as_versioned@592 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sat Jan 07 22:02:40 -0800 2006
commit  2590730df6fc9fa3a4f569ff8834f2692773e145
tree    392a9cfe0ff398bbc362f3cbf063ac9d5096444b
parent  3f3d13573e2f024d9e4d39ea5474ddffa68c1896
...
 
 
 
 
 
1
2
3
4
 
 
5
6
7
...
1
2
3
4
5
6
7
 
 
8
9
10
11
12
0
@@ -1,7 +1,12 @@
0
+*0.3.1*
0
+
0
+* (7 Jan 2006) explicitly set :foreign_key option for the versioned model's belongs_to assocation for STI [Caged]
0
+* (7 Jan 2006) added tests to prove has_many :through joins work
0
+
0
 *0.3*
0
 
0
-* (2 Jan 2005) added ability to share a mixin with versioned class
0
-* (2 Jan 2005) changed the dynamic version model to MyModel::Version
0
+* (2 Jan 2006) added ability to share a mixin with versioned class
0
+* (2 Jan 2006) changed the dynamic version model to MyModel::Version
0
 
0
 *0.2.4*
0
 
...
9
10
11
12
 
13
14
15
...
9
10
11
 
12
13
14
15
0
@@ -9,7 +9,7 @@ require 'rake/testtask'
0
 require 'rake/contrib/rubyforgepublisher'
0
 
0
 PKG_NAME = 'acts_as_versioned'
0
-PKG_VERSION = '0.3'
0
+PKG_VERSION = '0.3.1'
0
 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
0
 PROD_HOST = "technoweenie@bidwell.textdrive.com"
0
 RUBY_FORGE_PROJECT = 'ar-versioned'
...
196
197
198
199
 
200
201
202
...
196
197
198
 
199
200
201
202
0
@@ -196,7 +196,7 @@ module ActiveRecord #:nodoc:
0
           dynamic_model = <<-EOV
0
             class #{self.to_s}::#{versioned_class_name} < ActiveRecord::Base
0
               set_table_name "#{versioned_table_name}"
0
- belongs_to :#{self.to_s.demodulize.underscore}, :class_name => "#{self.to_s}"
0
+ belongs_to :#{self.to_s.demodulize.underscore}, :class_name => "#{self.to_s}", :foreign_key => "#{versioned_foreign_key}"
0
           EOV
0
           
0
           dynamic_model += %Q{include #{options[:extend].to_s}\n} if options[:extend].is_a?(Module)

Comments

    No one has commented yet.