Reputation: 1
It is possible to disable debug module in certain controllers?. what I want to do is a controller for ajax, I know that in the controller I can use simple renderPartial or just print the result but what if need to use a widget that registers js assets, that is why I use render but also de debug panels are loaded and need to remove it from the ajax response. If you have another approach of ajax responses please let me know.
Thank you.
Upvotes: 0
Views: 768
Reputation: 9357
Take a look at renderAjax, this might be exactly what you desire: http://www.yiiframework.com/doc-2.0/guide-structure-views.html#rendering-in-controllers
As a side note I never had a problem with any Ajax response because it contains the debugging data from the debug module. Also I have mixed feeling regarding returning a html response already with javascript in it. Are you sure you cannot just register the file from the start?
Upvotes: 0