I’m experiencing some unexpected weirdness with acts_as_tree.
class Category < ActiveRecord::Base
some code that returns the parent category variations if we have
pc = Category.new
pc.variations << “foo”
cc = Category.new
cc.parent = pc
So far so good …
pc.variations … [“foo”]
cc.variations … [“foo”]
pc.variations …  <— that’s expected
cc.variations … [“foo”] <-- UNEXPECTED!!
cc = Category.find 2
cc.variations …  <-- again, expected
What’s going on here? The reference to pc and cc.parent are also not
equal (before reloading even) but I guess that’s just how AR works.
I’m used to Hibernate returning the same reference.
Any suggestions or explanations?