hi, from the above code, what i understud is search is a method and it shold be defined in the controller right like def search @articles = Article.find_tagged_with(params[:search]) end or how it will be exactly can u help me regarding this
thanks . and to enter tag as search parameter on first form we should have some text box to enter right.how to do it. On Wed, Dec 3, 2008 at 4:57 PM, Thorsten Müller <[EMAIL PROTECTED]> wrote: > > On the first view you will need a form to enter the search like: > > <% form_tag(search_articles_path(), :method => :get) do %> > <%= label(:search, :tag, "Search:") %><br /> > <input name="search" id="tag" type="text" size="17" value='<%= > session[:search_keys] %>' style="width:123px;" /> > <input type="image" id="bt_zoek" src="/images/search.jpg" > alt="search" style="border:none;"/> > <% end %> > > this would give the search in params[:search] > > depending on some details, you can use this directly like > @articles = Article.find_tagged_with(params[:search]) > > But there are many ways to do this and much depends on details, > what exactly to search and display. > Some Ajax response may be another option. > But can't help you there, since that would require more knowledge > about the needs and actual state of your site. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---