Sha256: 1404ceb1c5e15ac4f9f583f1b652c94f2c7b0e4e4b93bc8be70dc4f4a3d34dac
Contents?: true
Size: 626 Bytes
Versions: 27
Compression:
Stored size: 626 Bytes
Contents
module Spud::Admin::PostsHelper def options_for_parent_category(parent_id = 0) if @categories[parent_id] return @categories[parent_id].collect{ |c| opts = [c.name, c.id] opts += options_for_parent_category(c.id) } else return [] end end def spud_post_site_check_box_tag(site, post) return check_box_tag 'spud_post[spud_site_ids][]', site[:site_id], post.spud_site_ids.include?(site[:site_id]), :id => "spud_post_site_id_#{site[:site_id]}" end def spud_post_site_label_tag(site) return label_tag "spud_post_site_id_#{site[:site_id]}", site[:site_name], :class => 'checkbox inline' end end
Version data entries
27 entries across 27 versions & 2 rubygems