I would like to use to_dollar method in my model like this:
to_dollar
module JobsHelper def to_dollar(amount) if amount < 0 number_to_cur
I know this thread is very old, but someone can look for solution for this problem in Rails 4+. Developers added ActiveSupport::NumberHelper, which can be used without accessing view related modules/classes using:
ActiveSupport::NumberHelper.number_to_currency(amount, precision: 0)