Reputation: 25
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.
Upvotes: 0
Views: 83
Reputation: 245429
Your best bet would be to use the functionality provided by the Ruby Linguistics Project:
companyLinkValue = Company.id.en.numwords
Upvotes: 3