Sha256: 967cc3340070e28bcfe2b985b3f752bf03307ca62abb0e32abd44a156fcc93f6
Contents?: true
Size: 789 Bytes
Versions: 12
Compression:
Stored size: 789 Bytes
Contents
- attr_ids_method = "#{attribute_name.to_s.singularize}_ids" - attr_ids = f.object.send(attr_ids_method) - attr_name = "#{f.object_name}[#{attr_ids_method}][]" - records = reflection.klass.roots - records = records.instance_exec(&reflection.scope) if reflection.scope h3= f.object.class.han(attribute_name) = hidden_field_tag attr_name, nil - records.each do |root| .checkbox_tree_input label.checkbox = check_box_tag attr_name, root.id, attr_ids.include?(root.id) b= AbAdmin.display_name(root) - children = root.children - children = children.instance_exec(&reflection.scope) if reflection.scope - children.each do |child| label.checkbox = check_box_tag attr_name, child.id, attr_ids.include?(child.id) = AbAdmin.display_name(child) hr
Version data entries
12 entries across 12 versions & 1 rubygems