Venkat Eee
2009-May-07 05:37 UTC
How to convert the model_name to table_name in ruby on rails
Hi, Can anyone help me "to convert the model_name to table_name in ruby on rails" Example: CustomerDetail to customer_details Regards, -- Posted via http://www.ruby-forum.com/.
Jakob
2009-May-07 06:17 UTC
Re: How to convert the model_name to table_name in ruby on rails
"CustomerDetails".tableize is what you should do. /Jakob On 7 Maj, 07:37, Venkat Eee <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > Can anyone help me "to convert the model_name to table_name in ruby on > rails" > > Example: CustomerDetail to customer_details > > Regards, > -- > Posted viahttp://www.ruby-forum.com/.
Venkat Eee
2009-May-07 06:34 UTC
Re: How to convert the model_name to table_name in ruby on rails
Venkat Eee wrote:> Hi, > > Can anyone help me "to convert the model_name to table_name in ruby on > rails" > > Example: CustomerDetail to customer_details > > Regards,Hey..... I got the solution for that... :-) table = ModelName.table_name -- Posted via http://www.ruby-forum.com/.