title: In rubyonrails, how to get the associated model class from and ActiveRecord::Relation object?
body: <p>Suppose I have an model:</p>
  
  <pre><code>class Post
  end  
  
  posts = Post.where(***)  
  puts posts.class # =&gt; ActiveRecord::Relation  
  </code></pre>
  
  <p>Then how can I get the model class name through the variable 'posts', maybe some method called model_class_name:<br>
      puts posts.model_class_name # => Post  </p>
  
  <p>Thanks :)</p>