How to convert ActiveRecord table name to model class name

前端 未结 3 468
小蘑菇
小蘑菇 2021-01-01 19:55

Is there any possibility to properly convert ActiveRecord table name to model class name? I have found one hack

def model_for_table(table_name)
  table_name.         


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