On 26 June 2013 16:01, cornelius wilson <li...@ruby-forum.com> wrote:
> Colin Law wrote in post #1113571:
>> On 24 June 2013 20:05, cornelius wilson <li...@ruby-forum.com> wrote:
>>> id=kids. It points to the searches controller for the following line:
>>>
>>> def index
>>> @search = Search.find(params[:search])
>>
>> find expects a numeric id value, presumable params[:search] is set to
>> "kids" rather than an id.
>>
>> 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

-- 
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%3D0gLutodFJy0V44jhnVhN4Bct42h3VH4UaZ%3DShUhipNYS7vw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to