title: How does local_assigns work in Rails?
body: <p>I've been googling around about this and can't find the right path. I'm working on a Rails app that is using a method called local_assigns. This appears to be something in Rails or a gem, and not specific to my app, but it's used for rendering a partial in different contexts, such as this:</p>
  
  <pre><code>&lt;% if local_assigns[:custom_name] %&gt;
    &lt;li&gt;&lt;%= custom_name %&gt;&lt;/li&gt;
  &lt;% else %&gt;
  </code></pre>
  
  <p>or also this:</p>
  
  <pre><code>&lt;%= render "discussions/complementary/#{local_assigns[:action] || params[:action]}" %&gt;
  </code></pre>
  
  <p>Is this is Rails method? Where can I find more documentation about this? </p>