Guys, I have a partial for a form here:

<% form_remote_tag(:controller => "posts", :action => "create") do %>
  <%= label_tag(:title, "Title") %><br />
  <%= text_area_tag(:title, nil) %><br />
  <%= label_tag(:body, "Description") %><br />
  <%= text_area_tag(:body, nil) %><br />
  <%= submit_tag("Post") %>
<% end %>


So I want to have a drop down where people can select what kind of
update this is before they post it,
something like: general or Job etc.
On an example code I found this;

  <p>
        <%= f.label :group_ids, "Group" %>
        <%= f.collection_select :group_ids, Group.all(:order => "name
ASC"), :id, :name %>
  <p>

Wich basically renders a drop down menu with all  "Groups"
Im my case I need to do something like this:

  <p>
        <%= f.label :update_type, "Post" %>
        <%= f.collection_select :update_type, Post.all(:order => "name
ASC"), :id, :name %>
  <p>


except, I dont have a local variable f on my partial on the first
chuck of code above.
so what is the syntax to change my last last piece of code to work
with the partial above so I
can effectively render a drop down that will let me select the
update_type ?

any help will be great.
Oliver.


-- 
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