I want to use the Rails ActionView::Helpers::NumberHelper module in my Sinatra views. Specifically, I'd like to use number_to_currency though I would love to have additional Rails helpers.
If there is a more appropriate gem for Sinatra that provides number to currency, that would work too. For example, I've looked through sinatra-more, but it doesn't handle currency.
PS. I'm using Bundler.
I found that only adding:
require 'active_support'
...didn't give me all the ActiveSupport methods I was hoping for (in my case, AS' fancy time parsing methods). As such, I went with this:
Gemfile.rb
gem 'activesupport', require: 'active_support/all'
It's in my Gemfile (since I'm using Bundler).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With