@@ -75,19 +75,7 @@ def reify(version, options)
7575
7676 model . send "#{ model . class . version_association_name } =" , version
7777
78- unless options [ :has_one ] == false
79- reify_has_ones version . transaction_id , model , options
80- end
81-
82- unless options [ :belongs_to ] == false
83- reify_belongs_tos version . transaction_id , model , options
84- end
85-
86- unless options [ :has_many ] == false
87- reify_has_manys version . transaction_id , model , options
88- end
89-
90- model
78+ reify_assoications version , model , options
9179 end
9280
9381 private
@@ -131,6 +119,16 @@ def prepare_array_for_has_many(array, options, versions)
131119 nil
132120 end
133121
122+ def reify_assoications version , model , options
123+ reify_has_ones version . transaction_id , model , options if options [ :has_one ]
124+
125+ reify_belongs_tos version . transaction_id , model , options if options [ :belongs_to ]
126+
127+ reify_has_manys version . transaction_id , model , options if options [ :has_many ]
128+
129+ model
130+ end
131+
134132 # Restore the `model`'s has_one associations as they were when this
135133 # version was superseded by the next (because that's what the user was
136134 # looking at when they made the change).
0 commit comments