On 20 June 2012 07:24, VIKRAM KUMAR MISHRA
<mishra.vikramkumar333-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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.
Sorry for not answering the question, but I cannot contain my
curiosity to know why you need to do this.
Colin
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.