Hi,
Can anyone help me “to convert the model_name to table_name in ruby on
rails”
Example: CustomerDetail to customer_details
Regards,
Hi,
Can anyone help me “to convert the model_name to table_name in ruby on
rails”
Example: CustomerDetail to customer_details
Regards,
Venkat E. 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
“CustomerDetails”.tableize is what you should do.
/Jakob
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs