2008/12/10 gilbert_tasik <[EMAIL PROTECTED]>: > --- In id-ruby@yahoogroups.com, Arie Kusuma Atmaja > > <[EMAIL PROTECTED]> wrote: >> >> Bustanil Arifin wrote: >> >> > Hi para master ruby, >> > >> > Mau tanya donk, saya punya class controller seperti ini: >> > >> > class MyController < ApplicationController >> > >> > @status = false >> > >> > def index >> > @status = true >> > end >> > >> > def status >> > return @status >> > end >> > >> > end >> > >> > Lalu di index.rhtml-nya >> > >> > <%if status %> >> > Status is true >> > <% else %> >> > Status is false >> > <% end %> >> > >> >> > Tapi kok kata rubynya : undefined local variable or method > 'status' for.... >> > Padahal kan sudah saya deklarasikan di class controllernya.. > > Kalo mendeklarasikan instance variable di controller @status, ya tentu > di view nya juga : > <% if @status %> > bukan > <% if status %> > > btw..( penasaran juga kaya bung Arie ) itu kodenya buat apa ya ? > hehehehe... >
Hehe, ketauan deh.. itu kodenya buat ngebom gedung putih. > Cheers, > > Feby A. Sukirman > > For The Horde !!!! > > -- Bustanil Arifin "Keep moving forward!"