开发者

Rails how to make a number (3) to a variable (three)?

I am trying to create some javascript links.

I need to transform the ID of a object to a variable.

For example:

Company.id = 3 

I want to transform the ID to a variable like three in the view.开发者_如何学编程


Your best bet would be to use the functionality provided by the Ruby Linguistics Project:

English - Ruby Linguistics

companyLinkValue = Company.id.en.numwords
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜