im new to rails so this is a beginner question. I want to make an admin page for an app with views from different controllers
I tried
render 'projects/index'
and it throws
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
also didnt have much luck with redirect_to (no routes match)
what is the best technique for doing that? I have a feeling it must be super simple and I’m missing something
The nil error that you’re getting looks like a problem with the view. Your view may be using an array that wasn’t initialized in your controller. Every controller rendering your admin view must initialize the arrays being used in your view.
That said, it sounds like your view should be rendered from only one controller.