search for: get_tax_from_freez

Displaying 1 result from an estimated 1 matches for "get_tax_from_freez".

Did you mean: get_tax_from_freezer
2006 Jan 19
0
Problem with an Tree-like object hierarchy (ActiveRecord acts_as_tree)
...een requests I store it in the session variable and retrieve it from there: def unfreeze_taxtree 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...