The “show” for a row from feeds works correctly, showing both rows which
that feed row. However, I’d like to add a “add” button (and a
“remove”?)
to the “Editing feed” page so that the the rows from categories will be
associated/unassociated with that feeds row.
(There’s a many-to-many relationship between “feeds” and “categories”.)
Feed: feed1
Edit | Back
Itemized Categories
cat1
category2
http://localhost:3000/feeds/show/1
Feed: feed2
Edit | Back
http://localhost:3000/feeds/show/2
Editing feed
Feed
Category
Show | Back
http://localhost:3000/feeds/edit/1
thufir@arrakis ~/Desktop/strawr $
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/show.rhtml –
lines=13
<% if @feed.has_categories? %>
Itemized Categories
<% for category in @feed.categories %> <% end %><%= category.category %> |
thufir@arrakis ~/Desktop/strawr $
thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/_form.rhtml –
lines=2
Category
<%= select("post",
"category_id", Category.find_all.collect {|c| [c.category, c.id]})
%>
thanks,
Thufir