Brilliant! Thanks :)
On 4/9/06, Cody Fauser <codyfauser@gmail.com>
wrote:> It has to do with the scope of the helper. The ActionView::Helpers
> modules aren''t included into the context the RJS helper method is
> executed in. You can manually include the helpers you want into your
> module like so:
>
> module ExpensesHelper
> include ActionView::Helpers::NumberHelper
>
> def help_me
> number_to_currency(10)
> end
> end
>
> On 4/8/06, Nicholas Henry <nicholas.henry@gmail.com> wrote:
> > Any ideas why I would get an error in a RJS helper on view helpers
> > such as number_to_currency.
> >
> > Example:
> >
> > # my_template.rjs
> >
> > page.help_me
> >
> > # my_helper for my_controller
> >
> > def help_me
> > number_to_currency(10)
> > end
> >
> > I have also tired page.number_to_currency but that doesn''t
work either.
> >
> >
> > Cheers,
> > Nicholas
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
>
>
> --
> Cody Fauser
> http://www.codyfauser.com
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>