diff options
author | Philip Arndt <parndt@gmail.com> | 2010-08-26 15:51:30 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-08-26 15:51:30 +1200 |
commit | f311f4dc549f188e5742b40b1ea360dc8ef77566 (patch) | |
tree | 51e48d842536ea2d0219fea7f5eccc0f436416df /app/views/admin | |
parent | 747a1b3a4e9f9dd93fb364671371e503be2e17db (diff) | |
download | refinerycms-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')
-rw-r--r-- | app/views/admin/blog/posts/_form.html.erb | 8 |
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> |