How do I get the name of a Ruby class?

后端 未结 5 800
青春惊慌失措
青春惊慌失措 2020-12-02 04:23

How can I get the class name from an ActiveRecord object?

I have:

result = User.find(1)

I tried:

result.class
# =&g         


        
5条回答
提交回复
热议问题