On 28 June 2013 21:29, cornelius wilson <li...@ruby-forum.com> wrote: > Colin Law wrote in post #1113657: >> On 26 June 2013 16:01, cornelius wilson <li...@ruby-forum.com> wrote: >>>> Colin >>> >>> How would I be able to reverse it so that it searches for the term as >>> oppose to the numeric id of the search options. As I would like for it >>> to be able to search all things on a user profile. >> >> I suggest you start by working right through a good tutorial such as >> railstutorial.org, which is free to use online. That will show you >> the basics of Rails. Also look through the Rails Guides, in >> particular the one on ActiveRecordQueryInterface. >> >> Colin > > I did that tutorial months ago. I have been able to build inbox > messaging from scratch, which was a challenging task with all the > features a inbox must have especially considering I have no prior coding > experience. I am 90% complete with my app, with the rest being small > fixes such as this basic search form, having users select photo from > gallery as their default profile picture, add user to favorites, and > then the rest is javascript. Directing me to read a tutorial does not > help me in this case. I have been stuck on this trying to figure it out. > Had other people take a look and they too can not spot the problem. > > The error is coming from "@search = Search.find(params[:search])" in the > searches controller for def index.
Can you explain what that line of code is supposed to do? Colin > I have tried different strings to see > if I can get around it. None have work. One solution I thought would be > best that just failed was moving the def index to the users controller > and combining it with the " @users = User.all" that is already there. > But that did not do anything either. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/44e3db3bf80f7dde640dbefcdffb5fc3%40ruby-forum.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLt%2Bc-UZW3nWxuY4d236R_Z6%2BtSWepO%2BVDGjdfvPtSB9jw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.