begini kali ya

<%= controller.action_name %>

2008/1/14 Booking Heaven <[EMAIL PROTECTED]>:

> Maksud Pertanyaannya Begini Bukan?
>
> APPLICATION CONTROLLER
> ---------------------------------------------------
>
> class TestController < ApplicationController
> :before_filter :tell_method_name
>
> def cari_nama_pegawai
>  @nama = "Hadi Sunyoto"
> end
>
> protected
>   def tell_method_name
>         nama_pegawai
>       @nama_method = "nama_pegawai"
>   end
>
> end
>
>
> VIEW  (Misal : /views/gudang/maling.rhtml
> ------------------------------------------------------------
> ...
> Siapa maling bulan ini di Gudang Kita??<br>
> <%= @nama %>
> Dicari Dari Method <%= @nama_method %>
> ...
>
>
> gitu bukan? saya udah test sih  jalan
>
>
>
> Hadi Sunyoto <[EMAIL PROTECTED]> wrote:
>     Apakah bisa?
>
>  misalnya
>
>  class TestController < ApplicationController
>
>  before_filter :tell_method_name
>
>  protected
>
>  def tell_method_name
>
>  #puts nama method yang akan dipanggil
>  end
>
>  def index
>
>  ...
>
>  end
>
>  def bla
>  ...
>  end
>
>  end
>
>  Kalau http://localhost:3000/test => terus di console nya keluar "index"
>  Kalau http://localhost:3000/test/bla => terus di console nya keluar "bla"
>
>  Apakah bisa?
>
>  ________________________________________________________
>  Bergabunglah dengan orang-orang yang berwawasan, di di bidang Anda!
> Kunjungi Yahoo! Answers saat ini juga di http://id.answers.yahoo.com/
>
>  [Non-text portions of this message have been removed]
>
>
>
>
>
>
> ---------------------------------
> Looking for last minute shopping deals?  Find them fast with Yahoo!
> Search.
>
> [Non-text portions of this message have been removed]
>
>
>
> ID-Ruby
> Berdiskusi dan belajar bersama Bahasa Pemrograman Ruby, termasuk segala
> varian Ruby (JRuby, Rubinius, IronRuby, XRuby), dan program yang dibuat
> dengan Ruby (Ruby on Rails, JRuby on Rails)
>
>    http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia
>
>
> Yahoo! Groups Links
>
>
>
>


-- 
irfani

YM : irfani_s
http://irfani.web.id


[Non-text portions of this message have been removed]

Kirim email ke