> The problem is when I want to format the output of attributes in that
> method. For example I want to format the attribute price to currency.
> There is a nice helper method called number_to_currency. How can I use
> this in my to_s method in my model?
>
Helpers are just modules.. I''d say you can include them as you would
with any other. Only problem would be if any of your helper methods
relies on the classes that are under Controllers'' hierarchy tree. If
not, everything should be fine.
regards,
javier ramirez
--
--------
Estamos de estreno... si necesitas llevar el control de tus gastos visita
http://www.gastosgem.com !!Es gratis!!
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---