I have a page with tabs and I want to just render different partials through ajax when the tabs are clicked upon. I have some code but I don\'t think it is the most efficien
Prasvin's answer is spot-on. Returning and executing JS may seem simple but it makes debugging much nastier - how do you set a breakpoint in JS that was returned via AJAX? Instead you should include all of your JS in the page and only send data back.