I want to be able to add/remove Category items from the GUI rather than
the console.
From "Listing feeds" clicking on "show" gives:
Feed: feed1
Edit | Back
Itemized Categories
cat1
category2
Then, clicking on "edit" will give:
Editing feed
Feed
Category
Show | Back
Where there''s a drop down list of Category items. However, how do I
add/
remove the associated Category rows? I''m missing some sort of submit
button?
thufir@arrakis ~/Desktop/strawr $
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/show.rhtml --
lines=13
<% if @feed.has_categories? %>
<h3>Itemized Categories</h3>
<table>
<% for category in @feed.categories %>
<tr>
<td><%= category.category %></td>
</tr>
<% end %>
</table>
<% end %>
thufir@arrakis ~/Desktop/strawr $
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/_form.rhtml --
lines=2
<p><label
for="category_id">Category</label><br/><%=
select("post",
"category_id", Category.find_all.collect {|c| [c.category, c.id]})
%></p>
thufir@arrakis ~/Desktop/strawr $
thanks,
Thufir
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---