Rails collection_check_boxes with Main type as well it's subtypes
|Added at||2016-12-24 09:12|
Iam Working on an Event Management System, where i have HABTM between events and employees, I have created a checkbox with employees name like this,
but there are so many employees, therefore i want my employees to be selected by their department as well, so that it becomes more easy to select employees by departments rather than indiviually. And i also want to keep select all checkbox which is working right now perfectly. Therefore in short i want to create a checkbox like selectall/deselect all, than below the department name checkbox and under department the employees of that departments. Iam currently displaying the checkbox in front of the name of the departments, but it is not working as i want, below is the code:
Please if anyone can help me.