I am trying to come up with a good way to handle the debugging data that I am generating in my app. I am aware of logger and am using it but I also want to be able to see selected object values in the browser window. Rather than just using lots of put statements in my view I want to try and use a debug hash or object to store all the debug data so that i can then render it on the page in a nice way.
Unfortunately I cannot find any built in object that would suit my needs and I cannot work out how to make an object available both in the controller and the view. Ideally I want the object to be available in controllers and views without having to explicitly declare it in each one.
I had thought about declaring a new model without a database table and then adding the methods I want to that model, but that seemed a bit to hackish. Is there another way of doing this?
Any help would be much appreciated.