提交 0d61d9eb 编写于 作者: J Justin Collins

Fix path to models in Util.file_by_name

上级 f79762ee
......@@ -305,7 +305,7 @@ module Brakeman::Util
unless type
if string_name =~ /Controller$/
type = :controller
elsif camelize(string_name) == string_name
elsif camelize(string_name) == string_name # This is not always true
type = :model
else
type = :template
......@@ -325,7 +325,7 @@ module Brakeman::Util
if tracker.models[name] and tracker.models[name][:file]
path = tracker.models[name][:file]
else
path += "/app/controllers/#{underscore(string_name)}.rb"
path += "/app/models/#{underscore(string_name)}.rb"
end
when :template
if tracker.templates[name] and tracker.templates[name][:file]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册