# Identifying specific mysql tables

**URL:** <https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058>\
**Category:** Rails\
**Created:** [February 25, 2008, 2:39am UTC](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058 "2008-02-25T02:39:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xwordguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/65b543/32.png) [@xwordguy](https://www.ruby-forum.com/u/xwordguy)\
**Post date:** [February 25, 2008, 2:39am UTC](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058/1 "2008-02-25T02:39:20Z")

</div>

Hey guys, I’m new to your ruby forums. Cool place 🙂

I was wondering if anyone knew how to only display specific tables in  
‘list.rhtml’

for example, I have 10 tables. I only want to show one/two of them in  
‘list.rhtml’

Anyone spare me hours of googling? 😃

---

<div class="post-metadata">

**Author:** ![xwordguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/65b543/32.png) [@xwordguy](https://www.ruby-forum.com/u/xwordguy)\
**Post date:** [February 25, 2008, 6:35am UTC](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058/2 "2008-02-25T06:35:58Z")

</div>

Hi Kevin,  
Are you looking to show the data from those tables on that page (say the  
tables are called cats and dogs)? The basic rails idiom for this is:

controller:  
def list  
@cats = Cat.find(:all)  
@dogs = Dog.find(:all)  
end

view:  
\<% @cats.each do |cat| %\>  
some display code here  
\<% end %\>

and repeat for @dogs.

Cheers,  
James

On Mon, Feb 25, 2008 at 12:09 PM, Kevin Morris \<

---

<div class="post-metadata">

**Author:** ![xwordguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/65b543/32.png) [@xwordguy](https://www.ruby-forum.com/u/xwordguy)\
**Post date:** [February 26, 2008, 2:40am UTC](https://www.ruby-forum.com/t/identifying-specific-mysql-tables/130058/3 "2008-02-26T02:40:14Z")

</div>

James,

Thank you for your feedback, the example gave me nice insight.

Resolved 🙂 Have a good week!
