Skip to content

Commit

Permalink
Merge pull request #4 from friendlycart/use-app-reloader
Browse files Browse the repository at this point in the history
Use app.reloader to load patches
  • Loading branch information
mamhoff authored Dec 18, 2024
2 parents 5a50d32 + 26aab6d commit f8e9011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/flickwerk/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class Flickwerk::Railtie < Rails::Railtie
end

initializer "flickwerk.find_patches" do |app|
app.config.to_prepare do
app.reloader.to_prepare do
Flickwerk.patch_paths.each do |path|
Flickwerk::PatchFinder.new(path).call
end
end
end

initializer "flickwerk.add_patches", after: "flickwerk.find_patches" do |app|
app.config.to_prepare do
app.reloader.to_prepare do
Flickwerk::PatchLoader.call
end
end
Expand Down

0 comments on commit f8e9011

Please sign in to comment.