I have an “undefined method” issue I can’t find the answer to.
In my layout file I have a “files: test” field which is the name of a test.yml file in my data dir.
Trying to access data in this test.yml file with the below code produces an “undefined method `f’” error.
<% f=current_page.data.files %>
<h3><%= data.f.items.first %></h3>
f resolves to ‘test’, and data.test.items.first works, but the above line doesn’t.
I am guessing this is a simple error, but I don’t know where to look to resolve it.
Can somebody please:
a) let me know how to resolve this
b) point me in the right direction for documentation to help me figure out these problems myself
thanks