# Search entire database

**URL:** <https://www.ruby-forum.com/t/search-entire-database/141012>\
**Category:** Ferret\
**Created:** [June 20, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/search-entire-database/141012 "2008-06-20T19:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vshyam121](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vshyam121](https://www.ruby-forum.com/u/vshyam121)\
**Post date:** [June 20, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/search-entire-database/141012/1 "2008-06-20T19:56:46Z")

</div>

Hi,  
is there any way to search through all the models and display it  
without having to loop through all the columns of each table?

I looked around and the only thing I could find was to specify :models  
=\> :all as an option when I call find\_by\_contents on a model. But that  
doesn’t work for me. It keeps only searching the model that I call  
find\_by\_contents on. But even if that works I don’t want to have to go  
through all my models (I have a lot of them) and loop through each  
column to output the search results.

Any easy methods to do this?

Thanks in advance.
