Hey folks - thanks in advance for any help. I’m in the process of
upgrading from 1.2.6 to 2.0.2. Everything’s working great in 1.2.6,
got rid of all deprecation messages, etc. But I’ve been banging my
head against a wall with this problem and am all Googled out.
I can’t seem to access any information through ANY of my belongs_to:
relationships. For example:
In my model I’ve got class Row which belongs_to :Entity
So in console I can look at a Row object:
#<Row:0x3278dd4 @attributes={"_clean_name"=>“Set 8A”, “rating”=>nil,
“created_on”=>“2006-12-19 18:09:55”, “name”=>“Set 8A</
strong>”, “entity_id”=>“5”, “guid”=>“ZAQ-84935”, “creator_id”=>“2”,
“id”=>“769”}>
If I say @row.Entity in my 1.2.6 console I get:
#<Entity:0x3249d2c @attributes={“rating_votes”=>“0”,
“uses_images”=>“1”, “created_on”=>“2006-10-27 00:00:00”,
“name”=>“Anker stones”, “singular”=>nil, “creator_id”=>“1”,
“uses_table”=>“0”, “id”=>“5”, “description”=>“blah blah”,
“entity_type_id”=>“2”, “image_id”=>“7242”, “name_rule”=>"{Set
Number}", “rows_count”=>“2”, “base_id”=>nil,
“example_row_id”=>“770”}>
However, if I say @row.Entity in my 2.0.2 console I get … wait for
it …
nil.
This happens any time I try to access a table relationship like that.
Has anyone else seen anything like this? Have any suggestions?
thanks much!
Jon