How to search for a string on multiple fields across multiple joined tables in Rails

June 23, 2006 at 12:27 am 8 comments

In my project I have to write a search controller, in which I have to search for a string on multiple fields across join tables.

There are two controllers Project, Publication and two models project and publication.
Project has many publication and publication belongs to project.

I wanted to search for a string on all fields of project and publications. For that I wrote a query in which I have to mention all the fields on which I wanted to search.
This was fine, but after some days I found a plugin: TextSearch. This changed the whole stuff.

This is a very useful plugin for search and you should try this.
For more detail please visit http://wiki.rubyonrails.org/rails/pages/TextSearch

Entry filed under: rails, rails plugins, RubyonRails. Tags: .

Plugin: file_column Plugin: cssForm

8 Comments Add your own

  • 1. Like Your Work » Blog Archive » links for 2006-12-24  |  December 24, 2006 at 12:19 am

    […] How to search for a string on multiple fields across multiple joined tables in Rails « Web On Rails (tags: rails search) […]

    Reply
  • 2. Delores  |  March 5, 2013 at 8:19 am

    I want to express appreciation to the writer just
    for bailing me out of this type of situation.
    Right after looking throughout the search engines and coming across things that
    were not beneficial, I thought my entire life was well over.
    Living minus the approaches to the difficulties you’ve fixed through the site is a crucial case, and the ones that might have adversely affected my career if I hadn’t
    discovered the blog. Your knowledge and kindness in dealing with everything was invaluable.

    I am not sure what I would have done if I hadn’t come upon such a stuff like this. It’s possible to at this point look ahead to my future.
    Thank you very much for the impressive and results-oriented help.

    I will not be reluctant to propose your web blog
    to anybody who should get direction on this situation.

    Reply
  • 3. popular fast food restaurants  |  June 19, 2013 at 7:55 pm

    I’m gone to convey my little brother, that he should also go to see this website on regular basis to get updated from most up-to-date information.

    Reply
  • 4. rozliczenie pita  |  August 6, 2013 at 12:06 pm

    Hey I am so excited I found your web site, I really found you by error,
    while I was looking on Bing for something else, Anyways I am
    here now and would just like to say many thanks for a fantastic post and a all round interesting blog (I also love the theme/design), I don’t have time to read it all at the moment but I
    have book-marked it and also added your RSS feeds, so when I have time I
    will be back to read much more, Please do keep
    up the excellent work.

    Reply
  • 5. Marcelo  |  September 16, 2013 at 12:18 pm

    Does your sute have a contact page? I’m having trouble locating it but, I’d like to shoot you an
    email. I’ve got some creative ideas for your blog you might be interested in hearing.
    Either way, great blog and I look forward to seeing it develop over time.

    Reply
  • 6. Free Wizard101 Codes  |  September 20, 2013 at 11:37 pm

    Hi there i am kavin, its my first time to commenting anywhere, when i read this
    piece of writing i thought i could also create comment due to this good post.

    Reply
  • 7. Interesting Research Paper Topics  |  October 1, 2013 at 3:25 am

    Sweet blog! I found it while searching on Yaahoo News. Do you
    have any suggestions on how to get listed in Yahoo
    News? I’ve been trying for a while but I never seem to get there!
    Cheers

    Reply
  • 8. Www.Youtube.Com  |  February 18, 2014 at 10:03 pm

    Very rapidly this site will be famous among all blog people,
    due to it’s fastidious posts

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Important Notice…

I have moved this blog to http://webonrails.com . I will continue posting at http://webonrails.com, not on https://webonrails.wordpress.com.

Kindly update your book marks to http://webonrails.com

and http://webonrails.com/feed .

I am really very sorry for inconvenience.

Comming Soon….

Domain for Sale

TheRailsHosting.com


(Contact me)

Recent Posts

Calender

June 2006
M T W T F S S
« Apr   Jul »
 1234
567891011
12131415161718
19202122232425
2627282930  

Subscribe

  • Add to Google
  • Subscribe in NewsGator Online
  • Subscribe with Bloglines
  • WebOnRails on feedburner
  • technorati

del.icio.us

Feeds

Flickr Photos

A bellezza di a natura (C☺rsica)

JWL5932 Mountain Hare..

Black and Gold

More Photos

Visitor’s Location

Blog Stats

  • 17,978 hits

%d bloggers like this: