Commit 26cbb75e authored by Arturo Herrero's avatar Arturo Herrero

Remove deprecation warning for Module#parents

DEPRECATION WARNING: `Module#parents` has been renamed to
`module_parents`. `parents` is deprecated and will be removed in Rails
6.1. (called from model_name at
../ee/app/models/concerns/custom_model_naming.rb:15)
parent 296680d7
......@@ -12,7 +12,7 @@ module CustomModelNaming
class_methods do
def model_name
@_model_name ||= begin
namespace = self.parents.detect do |n|
namespace = self.module_parents.detect do |n|
n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
end
Name.new(self, namespace)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment