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]