From 0cfca4b07c14cd11d90b2eb4e62eac74cf972fe5 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 15 May 2024 10:29:18 -0700 Subject: [PATCH] update engine.rb to specify engine root for migrations --- lib/hyku_knapsack/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hyku_knapsack/engine.rb b/lib/hyku_knapsack/engine.rb index d73eb3f..71b18e6 100644 --- a/lib/hyku_knapsack/engine.rb +++ b/lib/hyku_knapsack/engine.rb @@ -21,7 +21,7 @@ def self.load_translations! # only add the migrations if they are not already copied # via the rake task. Allows gem to work both with the install:migrations # and without it. - if !app.root.to_s.match(root.to_s) && + if !app.root.to_s.match(HykuKnapsack::Engine.root.to_s) && app.root.join('db/migrate').children.none? { |path| path.fnmatch?("*.hyku_knapsack.rb") } config.paths["db/migrate"].expanded.each do |expanded_path| app.config.paths["db/migrate"] << expanded_path