lib/processors/lib/rails2_route_processor.rb in brakeman-0.5.0 vs lib/processors/lib/rails2_route_processor.rb in brakeman-0.5.1
- old
+ new
@@ -114,11 +114,11 @@
#should be able to skip
when :collection, :member, :new
process_collection value
when :has_one
save_controller = current_controller
- process_resource value[1..-1]
+ process_resource value[1..-1] #Verify this is proper behavior
self.current_controller = save_controller
when :has_many
save_controller = current_controller
process_resources value[1..-1]
self.current_controller = save_controller
@@ -162,10 +162,10 @@
if controller
self.current_controller = controller
process_resource_options exp[-1]
else
exp.each do |argument|
- if argument.node_type == :lit
+ if sexp? argument and argument.node_type == :lit
self.current_controller = pluralize(exp[0][1].to_s)
add_resource_routes
process_resource_options exp[-1]
end
end