span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span></span></code></pre></div><p>This could be shared in a parent page, but you essentially have to remember to do this on every page that requires login (or do the opposite - allow specific pages to be accessed without logging in).</p><p>In Rails, this is a good practice, because even though your views won&#39;t route a logged-out visitor to a logged-in page, URL hacking or bugs could result in an attempt to do so. You