title: Where does @mime_partial come from?
body: <p>I have a <code>.rhtml</code> file and there are many condition checks like this <code>&lt;% if @mime_partial %&gt;</code> This condition is used before using html tags.</p>
  
  <p>I'm working on action mailer. I'm redesigning the view, the code is written by my friend. In the browser one can click the button to "send email". </p>
  
  <p>The variable <code>@mime_partial</code> is defined no where. I thought it's an internal thing of Rails. </p>
  
  <p>What is the significance of this <code>mime_partial</code>?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I used grep and got this:</p>
  
  <pre><code>xyz.merge!(:mime_partial =&gt; true, .... )
  </code></pre>
  
  <p>It has never been set to false, then why are they using if condition on it?</p>
  
  <p>Answer:</p>
  
  <p>I found out the answer.</p>
  
  <p>this <code>@mime_partial</code> corresponds to <code>mailer</code>. When I render the view in browser, it will be controlled by controller not mailer, so <code>@mime_partial</code> will be <code>false</code>.</p>
  
  <p>When I render the content by sending email, then in email the <code>@mime_partial</code> will be set to <code>true</code>, because it is controlled by mailer not controller. Then it will render some new contents which were inside the if condition.</p>
  
  <p>thanks for the support.</p>