by aboutruby · 7y ago · 0 comments
This can be done with Rails's number_to_currency helper: https://apidock.com/rails/ActionView/Helpers/NumberHelper/nu...
# Paisa.words
There is number_to_human which is close: https://api.rubyonrails.org/classes/ActionView/Helpers/Numbe..., otherwise number_to_words's gem https://github.com/kslazarev/numbers_and_words
I would actually recommend using the money gem to handle money objects: https://github.com/RubyMoney/money
Everybody seems to get this wrong, even Google Sheets.