Working around mysql bug...
This commit is contained in:
parent
96b6cfbf0c
commit
ce667bbbb1
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ class OldRelation < ActiveRecord::Base
|
|||
save!
|
||||
clear_aggregation_cache
|
||||
clear_association_cache
|
||||
@attributes.update(OldRelation.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes'))
|
||||
@attributes.update(OldRelation.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp], :order => "version desc").instance_variable_get('@attributes'))
|
||||
|
||||
# ok, you can touch from here on
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class OldWay < ActiveRecord::Base
|
|||
save!
|
||||
clear_aggregation_cache
|
||||
clear_association_cache
|
||||
@attributes.update(OldWay.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes'))
|
||||
@attributes.update(OldWay.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp], :order => "version desc").instance_variable_get('@attributes'))
|
||||
|
||||
# ok, you can touch from here on
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue