Fixed bug in loading roles.

This commit is contained in:
George Vinogradov 2011-10-28 00:10:49 +04:00
parent 2926cc6309
commit 97c49a718e
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ class Role < ActiveRecord::Base
end
a.rights = []
a.attributes = fields
Permission.delete_all
rights.each do |con, acts|
acts.each do |act|
unless r = Right.where(:controller => con, :action => act)