diff options
author | lizconlan <liz@mysociety.org> | 2014-07-24 14:24:58 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-22 12:39:03 +0100 |
commit | 7a7a57349432d01a99d6ba96cc7a4a130411a3b8 (patch) | |
tree | f077d2f8340b690517db7b01a5b1a592a1cc401a /app/helpers | |
parent | cb2dfa0c464e72c4d0eb00e5381e9d24c57d63e2 (diff) |
Enable admins to link public body categories to headings
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/admin_public_body_category_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/admin_public_body_category_helper.rb b/app/helpers/admin_public_body_category_helper.rb new file mode 100644 index 000000000..9c5e5cc5e --- /dev/null +++ b/app/helpers/admin_public_body_category_helper.rb @@ -0,0 +1,14 @@ +module AdminPublicBodyCategoryHelper + def heading_is_selected?(heading) + if params[:headings] + if params[:headings]["heading_#{heading.id}"] + return true + else + return false + end + elsif @category.public_body_headings.include?(heading) + return true + end + false + end +end |