Hi -- On Thu, 24 Sep 2009, Dudebot wrote:
> > Hi Gurus, I have a class, specified in models cart.rb, which doesn't > inherit from anything--it's just a container > > class Cart > ... > > I just discovered I can't call number_to_currency in that class. Any > idea how to "include" it in my code? I tried > ActionView.number_to_currency without luck. I could kill a few lines > of non-DRY regexp code in cart.rb if I could just use > number_to_currency. That method is in the module ActionView::Helpers::NumberHelper, so you can include that module (or extend an object with it or whatever). David -- David A. Black, Director Ruby Power and Light, LLC (http://www.rubypal.com) Ruby/Rails training, consulting, mentoring, code review Book: The Well-Grounded Rubyist (http://www.manning.com/black2) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

