# SEARCHING - my rails learning project

**URL:** <https://www.ruby-forum.com/t/searching-my-rails-learning-project/125444>\
**Category:** Rails\
**Created:** [January 9, 2008, 5:59am UTC](https://www.ruby-forum.com/t/searching-my-rails-learning-project/125444 "2008-01-09T05:59:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![agilehack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d2c977/32.png) [@agilehack](https://www.ruby-forum.com/u/agilehack)\
**Post date:** [January 9, 2008, 5:59am UTC](https://www.ruby-forum.com/t/searching-my-rails-learning-project/125444/1 "2008-01-09T05:59:05Z")

</div>

I am working on a small webapp as a learning project for rails and I  
could use a little help getting started please.

Essentially I have 2 tables now that I might combine into 1 and I need  
to build a solid search on this(these)tables. I know i need a model  
maybe two if I keep it two tables. I want to provide a search screen  
where the end user can query on 1 or more of about 5 available fields  
(name and address fields) and then I will return matching results and  
if the user chooses a result I will then display detail. I get the  
sense that this simple spec regardless of 1 table or 2 does not  
require much code due to the conventions in rails, ORM, and active  
record but not sure how to go ahead and implement. Scaffold?  
scaffold extensions? …plus others all seem to be possible starting  
points. I just want to create a solid search app the rails way and I  
am confused as to the most often used method. If its two tables do I  
relate the two tables somehow since the search fields are from either/  
both tables? etc…

getting a nice solid search together is confusing me - seems to be  
several ways to do it including hand coding fields which i have done  
for searching on one field before but this is a little bigger.

I almost see it as 1 table - 1 model - 1 controller?

can it be web 2.0? (ajax)

specific help on the most used method would be great - thanks everyone
