# Finding all records, some columns are null?

**URL:** <https://www.ruby-forum.com/t/finding-all-records-some-columns-are-null/139220>\
**Category:** Rails\
**Created:** [June 2, 2008, 2:21am UTC](https://www.ruby-forum.com/t/finding-all-records-some-columns-are-null/139220 "2008-06-02T02:21:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gummybears](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/51bf81/32.png) [@gummybears](https://www.ruby-forum.com/u/gummybears)\
**Post date:** [June 2, 2008, 2:21am UTC](https://www.ruby-forum.com/t/finding-all-records-some-columns-are-null/139220/1 "2008-06-02T02:21:23Z")

</div>

Hi,

I want to list all the records in my contacts table (platform  
WindowsXP, InstantRails latest version with MySQL,  
Rails 2.0.2 ).  
I populated the table contacts with test data, however the problem is  
that in the view some columns  
show their data, and some columns are just ‘‘empty’’ i.e I don’t see  
their value but these values do exist in the table ??

Hope someone can help here.

In my controller I do

class PagesController \< ApplicationController  
def index  
@contacts = Contact.find(:all)  
end

def show  
@contact = Contact.find(params[:id])  
end  
end

in my view index.rhtml I have

\<% for contact in @contacts -%\>

\<%= h(contact.id) %\>

 \<%= h(contact.naam) %\>

\<%= h(contact.adres) %\>

P \<%= h(contact.postcode) %\> P \<%= h(contact.plaats)%\>

T \<%= h(contact.telefoon) %\>

E \<%= h(contact.email) %\>

\<%= link\_to 'Detail', :controller =\> 'pages', :action =\> 'show', :id =\> acontact %\>

\<% end %\>
