Hi…
I have list.rhtml file default generated by scaffold for user table.
This file displays list of all user table rows. Inside this file I want
to display the list of the all the rows from my anothe table (stores).
How to do that?
I tried with following inside my above list.rhtml.
<% for store in @stores %>
But its giving me error like:-
===============
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
I think I am getting above error because list.rhtml file is in user view
& not in store view . How to fix above error ?