Is there a way to run the view inside a partial
I know this is weird. but i can't figure out other ways to do what i need. I have a controller: report and view: report. Also I have a view that acts like a panel where I see multiple zones (partial). I need to add this report to my dashboard but dont know how. This report view uses complex controller logic and displays the results. How could I "get stuck" (boolean + view) of the output view (report) in my partials so that I could use it in the dashboard?
Thank. Valve.
source to share
(I hope I understand the problem, here ...)
This part seemed significant:
This report view uses complex logic from a controller
Typically, controllers should be simple. Really simple. A rule of thumb is "thin controller, fat model" (Rails Envy has done some interesting but useful screencasts on the topic )
What happens if you create a new model (perhaps not inheriting from ActiveRecord :: Base) that encapsulates the logic you want to pass into a partial? Then different combinations of controllers / actions can deliver information to your views as needed / required.
Or am I completely missing the point (not impossible!)
source to share