Okay, I know this is a really beginner question. But....
I created a migration to create an entity post. I gave it a title. I
ran the migration.
Then, I created an admin controller, entitled simply admin_controller.
I defined an index action like so:
Then I created an index view:
<% @posts.each do |post| %>
What do I get?
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
So I created a migration to add a row to the database so there would
be at least one. Still get the nill object. What's going on? What
really basic thing have I overlooked?