def save_with_dependencies!
save!
- #not sure whats going on here
- clear_aggregation_cache
- clear_association_cache
- #ok from here
- @attributes.update(OldNode.where(:node_id => self.node_id, :timestamp => self.timestamp, :version => self.version).first.instance_variable_get('@attributes'))
self.tags.each do |k,v|
tag = OldNodeTag.new
end
def tags
- unless @tags
- @tags = Hash.new
- self.old_tags.each do |tag|
- @tags[tag.k] = tag.v
- end
- end
- @tags = Hash.new unless @tags
- @tags
+ @tags ||= Hash[self.old_tags.collect { |t| [t.k, t.v] }]
end
def tags=(t)