# Roles edit checkboxes all offset

**URL:** <https://www.ruby-forum.com/t/roles-edit-checkboxes-all-offset/56209>\
**Category:** Engines\
**Created:** [March 29, 2006, 1:57am UTC](https://www.ruby-forum.com/t/roles-edit-checkboxes-all-offset/56209 "2006-03-29T01:57:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolfmanjm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Post date:** [March 29, 2006, 1:57am UTC](https://www.ruby-forum.com/t/roles-edit-checkboxes-all-offset/56209/1 "2006-03-29T01:57:09Z")

</div>

I have installed the latest trunk versions of engines/login/user, and am  
on rails 1.1.

I ran rake sync\_permissions to get a few more controllers and actions  
added.

When I go to edit roles user the Permissions checkboxes for the User  
role are clear and the check boxes are set and show up in the last  
column of an unrelated controller instead. Also clicking check all or  
none sets or clears the checkboxes of another controller, it seems they  
are all offset by one or two… very weird, does anyone else see this  
before I dive into the code to debug it?

Thanks

---

<div class="post-metadata">

**Author:** ![wolfmanjm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/3da27b/32.png) [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Post date:** [March 29, 2006, 4:01am UTC](https://www.ruby-forum.com/t/roles-edit-checkboxes-all-offset/56209/2 "2006-03-29T04:01:43Z")

</div>

Ok fixed it, for some reason the order was different in the header and  
the body of the table this diff shows the simple fix, just sort the  
headers the same way the body of the table is sorted

\*\*\* vendor/plugins/user\_engine/app/views/role/\_form.rhtml  
2006-03-28 17:59:50.733427091 -0800  
— …/…/svnengines/user\_engine/app/views/role/\_form.rhtml  
2006-03-27 16:45:59.000000000 -0800

* * *

\*\*\* 15,21 \*\*\*\*

  

! \<% @all\_actions.keys.sort.each do |controller\_name|  
controller\_id = controller\_name.gsub("/", “\_”)  
#perms\_id = controller\_id + “\_perms”  
%\>  
— 15,21 ----

|
| |

  

! \<% @all\_actions.each\_key do |controller\_name|  
controller\_id = controller\_name.gsub("/", “\_”)  
#perms\_id = controller\_id + “\_perms”  
%\>

|
| |
