Retrieve model name from table name rails 3

Hi All,

I want to derive the model name from table name.

One method i got is using table_name.classify. But this does not give
actual model name. The scenario is

Class User < ActiveRecord::Base

self.table_name = “abc_xyz”

end

Now i want to retrieve the model name from table name “abc_xyz” which
should be User.

Any help is highly appreciated.

Thanks
Vikram

On 20 June 2012 07:24, VIKRAM KUMAR MISHRA
[email protected] wrote:

end

Now i want to retrieve the model name from table name “abc_xyz” which should
be User.

Sorry for not answering the question, but I cannot contain my
curiosity to know why you need to do this.

Colin