Mariano Kamp
2005-Dec-08 20:49 UTC
Re: When to restart the server? Was: N00B Question: How to access methods in a helper?
Rick, thanks for your quick response. It works now. So that means that I cannot use things like textilize in my model for example, right? Ok, fine with me, helpers are view helpers then. Groked it. After using some_helper_method() I changed it to textilize, but it was still using the old code even after removing some_helper_method. After restarting webrick it works fine. Btw. I tried that in the development environment, without caching. At least no caching I am aware of. The parameters regarding caching are still in the default state. Is there any hard rule when to restart webrick? Cheers, Mariano On 12/8/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > blog_controller.rb: > > class BlogController < ApplicationController > > def index > > render(:text => some_helper_method("x")) > > end > > end > > Helpers are not available in controllers. Try this instead: > > def index > render :inline => "<%= some_helper_method(''x'') %>" > end > > > -- > rick > http://techno-weenie.net > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails