Adaptively render views in Ruby on Rails <p>In a RoR app, I have all partial views and a single layout page. If the request is ajax, I want to return only the partially rendered html, otherwise I want to return the fully rendered html page. </p> <p>What is the most efficient way to do this in RoR? I would prefer to do this at the application level rather than in every single controller action.</p>