aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/posts/_form.html.erb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-26 15:51:30 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-26 15:51:30 +1200
commitf311f4dc549f188e5742b40b1ea360dc8ef77566 (patch)
tree51e48d842536ea2d0219fea7f5eccc0f436416df /app/views/admin/blog/posts/_form.html.erb
parent747a1b3a4e9f9dd93fb364671371e503be2e17db (diff)
downloadrefinerycms-blog-f311f4dc549f188e5742b40b1ea360dc8ef77566.tar.gz
refinerycms-blog-f311f4dc549f188e5742b40b1ea360dc8ef77566.tar.bz2
refinerycms-blog-f311f4dc549f188e5742b40b1ea360dc8ef77566.zip
Blog categories now save onto their posts.
Diffstat (limited to 'app/views/admin/blog/posts/_form.html.erb')
-rw-r--r--app/views/admin/blog/posts/_form.html.erb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index 22f7385..f4322df 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -27,8 +27,12 @@
<ul class='blog_categories'>
<% @blog_categories.each do |category| %>
<li>
- <%= check_box_tag 'blog_post[category_ids][]', category.id, {}, :id => (id="blog_post_category_ids_#{category.id}") %>
- <%= label_tag 'blog_post[category_ids][]', category.title, {:class => 'stripped', :for => id} %>
+ <%= check_box_tag 'blog_post[category_ids][]', category.id,
+ @blog_post.categories.include?(category),
+ :id => (id="blog_post_category_ids_#{category.id}") %>
+ <%= label_tag 'blog_post[category_ids][]', category.title,
+ :class => 'stripped',
+ :for => id %>
</li>
<% end %>
</ul>