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