0

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.

1 Answer 1

0

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?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.