KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Suppose I have an model: class Post end posts = Post.where(***) puts posts.class # => ActiveRecord::Relation Then how can I get the model class name through the variable 'posts', maybe some method called model_class_name: puts posts.model_class_name # => Post Thanks :)
Tags (comma-separated)
Save Edits
Cancel