lib/ixtlan/guard/guard_config.rb in ixtlan-guard-0.7.2 vs lib/ixtlan/guard/guard_config.rb in ixtlan-guard-0.8.0
- old
+ new
@@ -9,11 +9,10 @@
raise GuardException.new("guards directory does not exists: #{@guards_dir}") unless File.directory?(@guards_dir)
end
def allowed_groups(resource, action)
if resource && action
- resource = resource.to_s
- groups = send(@load_method, resource)
+ groups = send(@load_method, resource.to_s)
groups[action.to_s] || groups["defaults"] || []
else
[]
end
end