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
精彩评论