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
--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment