My setup looks like this:
#list.rhtml
<h2 class="title"><%= @title %></h2>
<div id="project_list">
<%= render(:partial => "project", :collection => @projects)
%>
</div>
<% content_for(:sidebar) do %>
<%= render :partial => ''sidebar'' %>
<% end %>
#_sidebar.html
<p>Create a new project</p>
<%= form_remote_tag :url => { :action => ''create'' },
:html => {:id =>
''new-project-form''} %>
<%= render :partial => ''form'' %>
<%= submit_tag ''Create project'' %>
</form>
My _form partial is pretty standard: <%= error_messages_for
''project''
%> followed by form fields. The create method for the controller
(called project_controller) can be seen here:
http://pastie.caboo.se/34584
I know that validations are working correctly but I don''t know how I
can get them to appear within the _sidebar partial. Can someone point
me in the right direction?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---