I've a problem with the instance_variable_get method cause it's always returns nil object with one of my object instance. Here is my code:
logger.info "ASDF: " + @d_tree.inspect
logger.info "ASDF: " + @d_tree.instance_variable_get(:@content);
and the output is:
ASDF: #<DTree id: 11, parent_id: nil, content: "bababababa", subsidiary_info: "", deep_info: "blabla", title: "hello", direction: 1, created_at: "2010-10-26 19:27:32", updated_at: "2010-11-01 23:14:31", color: 2, cell_color: 2, howtoinfo: "howtoinfooo", textinfo: "textInfooo", locationinfo: "locationInfoooo", productinfo: "productinfoooo">
TypeError (can't convert nil into String):
/app/controllers/d_trees_controller.rb:38:in `+'
According to the inspect the object seems to be fine, but the instance_variable_get returns a nil object
Thanks for your help!