Take the 2008 Git User's Survey and help out! [ hide ]

public
Rubygem
Description: acts_as_revisable enables revision tracking, querying, reverting and branching of ActiveRecord models. Inspired by acts_as_versioned.
Clone URL: git://github.com/fatjam/acts_as_revisable.git
Search Repo:
Apply revision_association_options to the branches association.
rich (author)
Tue Jul 22 09:59:43 -0700 2008
commit  bc88a56b8e57d6bdb94a8d65ca108a1f781c071d
tree    cf9480930a37399eae6d1ccc028d04eed74859f7
parent  97fc9feab2b3e4eecc578c6bae5fe162d03b871d
...
2
3
4
5
 
6
7
8
...
2
3
4
 
5
6
7
8
0
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
0
   s.rdoc_options = ["--main", "README.rdoc"]
0
   s.summary = "acts_as_revisable enables revision tracking, querying, reverting and branching of ActiveRecord models. Inspired by acts_as_versioned."
0
   s.name = "acts_as_revisable"
0
- s.version = "0.9.6"
0
+ s.version = "0.9.7"
0
   s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
0
   s.email = "cavanaugh@fatjam.com"
0
   s.has_rdoc = true
...
24
25
26
27
 
 
28
29
30
...
24
25
26
 
27
28
29
30
31
0
@@ -24,7 +24,8 @@ module FatJam
0
 
0
         base.instance_eval do
0
           define_callbacks :before_branch, :after_branch
0
- has_many :branches, :class_name => base.class_name, :foreign_key => :revisable_branched_from_id
0
+ has_many :branches, (revisable_options.revision_association_options || {}).merge({:class_name => base.class_name, :foreign_key => :revisable_branched_from_id})
0
+
0
           belongs_to :branch_source, :class_name => base.class_name, :foreign_key => :revisable_branched_from_id
0
           after_save :execute_blocks_after_save
0
           disable_revisable_scope :branch_source, :branches
...
37
38
39
40
41
42
43
44
45
 
 
46
47
48
...
37
38
39
 
40
41
42
43
44
45
46
47
48
49
0
@@ -37,12 +37,13 @@ module FatJam
0
         # Performs the setup needed for both kinds of acts_as_revisable
0
         # models.
0
         def revisable_shared_setup(args, block)
0
- self.send(:include, Common)
0
           class << self
0
             attr_accessor :revisable_options
0
           end
0
           options = args.extract_options!
0
           self.revisable_options = Options.new(options, &block)
0
+
0
+ self.send(:include, Common)
0
         end
0
     end
0
   end
...
3
4
5
6
 
7
8
9
...
3
4
5
 
6
7
8
9
0
@@ -3,7 +3,7 @@ module FatJam #:nodoc:
0
     module VERSION #:nodoc:
0
       MAJOR = 0
0
       MINOR = 9
0
- TINY = 6
0
+ TINY = 7
0
 
0
       STRING = [MAJOR, MINOR, TINY].join('.')
0
     end

Comments

    No one has commented yet.