Partial Error

I have a home controller and a Search controller.

I would like to include the search form in the content of the home
controller so I am doing this…

<%#= render :partial => “/searches/form”, :object => Search.new, :as
=> @search %>
<%= render :partial => “/searches/form”, :locals => {:search =>
Search.new } %>

The _form partial looks like this…

<% semantic_form_for @search do |f| %>
<%=
f.inputs :term, :group_by, :group_function, :sort_by, :sort_mode,
:with, :origin%>
<%= f.buttons %>
<% end %>

when I load the home page I get the following error.

Showing app/views/searches/_form.html.erb where line #1 raised:
Called id for nil, which would mistakenly be 4 – if you really wanted
the id of nil, use object_id

What am I doing wrong?

Thanks