提交 3011634a 编写于 作者: J Justin Collins

Process mixin methods in alphabetical order

for consistency
上级 56e7c556
......@@ -40,10 +40,13 @@ class Brakeman::ControllerAliasProcessor < Brakeman::AliasProcessor
next unless mixin
mixin[:public].each do |name, meth|
#Process methods in alphabetical order for consistency
methods = mixin[:public].keys.map { |n| n.to_s }.sort.map { |n| n.to_sym }
methods.each do |name|
#Need to process the method like it was in a controller in order
#to get the renders set
meth = Brakeman::ControllerProcessor.new(@tracker).process meth
meth = Brakeman::ControllerProcessor.new(@tracker).process mixin[:public][name]
#Then process it like any other method in the controller
process_safely meth
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册