From: Peter Ertl Date: 2005-11-09T02:58:20+09:00 Subject: Re: Can a action view invoke a methode of a controller then display its results You can put a helper inside the controller: class FooController < ApplicationController helper do def erase_harddisk "ouch!" end end end [inside foo.rhtml] <%= erase_harddisk %> However, it is strongly discouraged to put application logic inside your view. regards Peter > --- Urspr�ngliche Nachricht --- > Von: sayoyo@yahoo.com > An: ruby-talk@ruby-lang.org (ruby-talk ML) > Betreff: Re: Can a action view invoke a methode of a controller then > display its results > Datum: Wed, 9 Nov 2005 02:47:11 +0900 > > Hi, > > I have tried the @controller.actionTwo, but it doesn't work. I got the > following msg error: > > You have a nil object when you didn't expect it! > The error occured while evaluating nil.actionTwo > > I think, it doesn't recognize the contorller.... > > Sayoyo > >