I want to populate the landing page of my app with index pages of other controllers using xhr calls whenever someone loads the homepage. However, whenever I try doing this, the layout gets rendered twice I have tried a couple of things mentioned in other answers like:
class ApplicationController < ActionController::Base
layout proc { false if request.xhr? }
but my page is still loading the layout multiple times. What can I do to get around this?