tasks/cbac.rake in cbac-0.6.8 vs tasks/cbac.rake in cbac-0.6.9
- old
+ new
@@ -37,10 +37,10 @@
# Dump the specified permissions to a YAML file
def dump_permissions_to_yaml_file(permissions)
permissions.each do |cp|
privilege_set_name = get_privilege_set(:id => cp['privilege_set_id']).name
- cp['privilege_set_id'] = "<%= Cbac::PrivilegeSetRecord.find(:first, :conditions => {:name => '#{privilege_set_name}'}).id %>"
+ cp['privilege_set_id'] = "<%= Cbac::PrivilegeSetRecord.where(name: '#{privilege_set_name}').first.id %>"
end
dump_objects_to_yaml_file(permissions, "permissions")
end
# Dump a set of objects to a YAML file. Filename is determined by type-string