I have a has_many association between my sidebar and its blocks.
I select them by using i.e. @sidebar = Sidebar.find(1,:include=>:blocks)
this gives me my sidebar and its blocks in one query.
Then I save this @sidebar variable into a YAML file for fast access and
deployment. I checked the YAML file by eye and it seems ok. Then I
the YAML into my application (in console) and sidebar.blocks is there…
whenever I try to access sidebar.blocks it queries the database. What
wrong in this setup? The blocks is loaded from yaml file (console shows
but whenever I try to access it queries the database.
Thanks in advance