title: How can I get the model name of object in rails?
body: <p>I got four different models.</p>
  
  <p>Here's an example,</p>
  
  <pre><code>@single = Single.all
  @coe = Coe.all
  @blend = Blend.all
  @production = @single+@coe+@blend
  </code></pre>
  
  <p>then how to check which model @production is?</p>
  
  <p>I tried </p>
  
  <pre><code>&lt;% @production.each do |p| %&gt;
    &lt;%=p.class.name%&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>but it returns "Array"</p>
  
  <p>It seems to be simple, but I can't find out
  (I edited question)</p>