+ @attributes.update(OldNode.where('id = ? AND timestamp = ? AND version = ?', self.id, self.timestamp, self.version).first.instance_variable_get('@attributes'))
self.tags.each do |k,v|
tag = OldNodeTag.new
self.tags.each do |k,v|
tag = OldNodeTag.new
@@ -74,7+84,7 @@ class OldNode < ActiveRecord::Base
def tags
unless @tags
@tags = Hash.new
def tags
unless @tags
@tags = Hash.new
- OldNodeTag.find(:all, :conditions => ["id = ? AND version = ?", self.id, self.version]).each do |tag|
+ OldNodeTag.where("id = ? AND version = ?", self.id, self.version).each do |tag|
@tags[tag.k] = tag.v
end
end
@tags[tag.k] = tag.v
end
end
@@ -87,11+97,7 @@ class OldNode < ActiveRecord::Base