12 Nov 2008 18:42
Re: Hum... What's wrong with me ?
Hey....me too. I've been using the style I recommended before in my code thus far, but maybe I didn't need to. Is it something that differs between Camping versions? On Wed, Nov 12, 2008 at 12:37 PM, Magnus Holm <judofyr@...> wrote: > Huh? I just pasted that code, ran "camping test.rb" and it worked just like > expected: "Camping say Hello World!"... > -- > Magnus Holm > > > On Wed, Nov 12, 2008 at 6:29 PM, Eric Mill <kprojection@...> wrote: >> >> You want >> >> def get >> render :index, :hello => "Hello World!" >> end >> >> in your view. Unlike Rails, instance variables aren't magically >> carried along from Controller to View. >> >> -- Eric >> >> On Wed, Nov 12, 2008 at 12:03 PM, Gregoire LEJEUNE >> <gregoire.lejeune@...> wrote: >> > Hi Campers, >> > >> > i just download and install the last version from >> > http://github.com/why/camping/tree/master >> > >> > Then, when i test with this piece of code : >> > >> > require 'camping' >> > >> > Camping.goes :Test >> > >> > module Test::Controllers >> > class Index < R '/' >> > def get >> > <at> hello = "Hello World!" >> > render :index >> > end >> > end >> > end >> > >> > module Test::Views >> > def layout >> > html do >> > body do >> > self << yield >> > end >> > end >> > end >> > >> > def index >> > p "Camping say #{ <at> hello}" >> > end >> > end >> > >> > I just see "Camping say" not "Camping say Hello World!"... >> > >> > So what's wrong ? >> > _______________________________________________ >> > Camping-list mailing list >> > Camping-list@... >> > http://rubyforge.org/mailman/listinfo/camping-list >> > >> _______________________________________________ >> Camping-list mailing list >> Camping-list@... >> http://rubyforge.org/mailman/listinfo/camping-list > > > _______________________________________________ > Camping-list mailing list > Camping-list@... > http://rubyforge.org/mailman/listinfo/camping-list >
RSS Feed