href="#query">Query</a></li><li><a href="#resource">Resource</a></li></ul></nav></header><h2 id="controller"><a href="#controller" class="anchor"></a>Controller</h2><p>A &quot;controller&quot; is a source code file/module in the <code>app/controllers</code> file. Unlike models, controllers have almost exactly the same role as in MVC frameworks like Rails: they are the interface layer between requests/response to/from the server and database operations on models. For example, a controller might respond to a 