lib/ixtlan/guard/guard.rb in ixtlan-guard-0.4.1 vs lib/ixtlan/guard/guard.rb in ixtlan-guard-0.5.0

- old
+ new

@@ -164,16 +164,18 @@ # union - no duplicates flavor_list = flavor_list - list + list end action_node[flavor.to_s.sub(/s$/, '') + "s"] = flavor_list if flavor_list.size > 0 end - actions << action_node + actions << { :action => action_node } actions << @aliases[resource][action] if @aliases[resource][action] end end end - result = map.values + result = map.values.collect do |perm| + { :permission => perm } + end result.class_eval "alias :to_x :to_xml" unless map.respond_to? :to_x def result.to_xml(options = {}, &block) options[:root] = :permissions unless options[:root] to_x(options, &block) end