Displaying 1 result from an estimated 1 matches for "find_tax".
Did you mean:
find_tag
2006 Jan 19
0
Problem with an Tree-like object hierarchy (ActiveRecord acts_as_tree)
...ee
if taxtree_frozen then return Marshal.load(session[:tax_tree])
else return nil end
end
def freeze_taxtree(tax)
return session[:tax_tree] = Marshal.dump(tax)
end
def get_tax_from_freezer(tax_id)
@@tax_tree = unfreeze_taxtree
ObjectSpace._id2ref(@@tax_tree.find_tax(tax_id))
end
So tax are the nodes and tax_tree the ... well ... tree.
I did the marshaling and retrieving via object id because I was
getting paranoid about the objects not being the original ones after
unfreezing from the session cache.
Before the first freezing I tried to send down a ping...