On Tue, Jul 03, 2007 at 04:12:09PM +0200, William Monk wrote:
> 
> Hi,
> 
> Thanks for your really fast reply. I am quite new to rails and couldnt 
> find anything which was pointing me in the right direction apart froms 
> some complicated tutorials. I have done what you have said, but i am not 
> sure what the form should look like to give results, this is what i am 
> using at the moment, plus everything you told me:
> 
> 
> <div id="search">
>   <% form_tag({:action => :search}, :method => 'get') do %>
>       <%= text_field_tag :query, params[:query] %><%= submit_tag 
> 'Search', :id => 'hide'%>
>   <% end %></div>
> 
> 
> but i get an error:
> 
>  TypeError in BlogController#search
> 
> wrong argument type Symbol (expected Data)
> 
> im not sure if this is to do with the posts being indexed incorectly, 
> but if you could help again that would be great! Thanks Will

I had a small typo in the controller, it should read

find_by_contents(params[:query])

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to