hi all

i was wondering whether it is possible to use partials along with form_for
and form_field. following code is not working. is there some error or this
case is impossible..??

*#new.html.erb*

<h1>Enter Details for new Partner:</h1>

<% form_for(@partner) do |f| %>
  <%= render :partial => 'form', :locals => {:partner => f} %>

  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

*#_form.html.erb*

  <%= f.error_messages %>

  <p>
    <%= f.label :organisations_id, "Organisation Id" %><br />
    <%= f.text_field :organisations_id %>
  </p>
  <p>
    <%= f.label :branches_id, "Branch Id" %><br />
    <%= f.text_field :branches_id %>
  </p>


regards
-- 
Sahil

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to