Booking Heaven | 13 May 10:42

Re: [Rails] Active record error

Coba di def show di controller kamu liat baik2 :
@employee atau @employees, terus kamu bikinnya :

@employee = Employee.find(:all, bla..bla..bla)

atau

@employee = Employee.find_by_nip

coba kamu paste kode di sini : pastie.org, terus paste link setelah kamu save kesini. coba cek sekalian di
tabel employeenya. apakah ada nama kolom nip. Ini cuma kasus kurang teliti aja kok hehe...

Reinhart
http://teapoci.blogspot.com

--- On Tue, 5/13/08, kristianto <kristiantohalim@...> wrote:
From: kristianto <kristiantohalim@...>
Subject: Re: [id-ruby][Rails] Active record error
To: id-ruby@...
Date: Tuesday, May 13, 2008, 12:29 AM

    
            nah untuk mengakalinya coba gini di view kamu

<% for colomn in @employee %>

<%= colomn.nip %>

<% end %>

nah saya sudah coba seperti yang diatas tapi permasalahan jadi seperti 

ini undefined method nip...

Bukankah employee sudah mengandung nip dan colomn juga merupakan 

employee bukan?

teman2 tolong beri penjelasan.. .. Apakah pemahaman saya salah?

kalau salah tolong teman2 tidak berberat hati untuk menjelaskan kepada 

saya...

Trimakasih,

Salam

Kristianto

<http://teapoci. blogspot. com>

    

	
	 
	
	

	

	
	

      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

------------------------------------

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, Merb)

<*> Kunjungi *arsip milis* id-ruby di
    http://groups.yahoo.com/group/id-ruby/messages
    http://www.mail-archive.com/id-ruby-hHKSG33TihhbjbujkaE4pw <at> public.gmane.org/
    http://rubyurl.com/Q8DD
    http://news.gmane.org/gmane.comp.lang.ruby.region.indonesia

<*> Baca peraturan id-ruby sebelum posting
    http://rubyurl.com/gay1

<*> Ikutilah Jajak Pendapat ID-Ruby
    http://rubyurl.com/3CCt

<*> Links ID-Ruby
    http://rubyurl.com/n96r

<*> Database ID-Ruby
    http://rubyurl.com/Iw3u

<*> Kunjungi Situs Resmi Ruby Indonesia
    http://www.ruby-lang.org/id/

<*> Join Ruby Indonesia on Facebook
    http://rubyurl.com/QV48

<*> Join Ruby Indonesia on LinkedIn
    http://rubyurl.com/eh0i

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/id-ruby/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/id-ruby/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:id-ruby-digest@... 
    mailto:id-ruby-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    id-ruby-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Gmane