Skip to content

Commit

Permalink
Fix activegraph module for zeitwerk loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhardikjoshi committed Jan 8, 2024
1 parent 064aee4 commit 95600ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/active_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
loader.ignore(File.expand_path('rails', __dir__))
loader.ignore(File.expand_path('active_graph/railtie.rb', __dir__))
loader.inflector.inflect("ansi" => "ANSI")
module ActiveGraph
end
loader.setup
# loader.eager_load

Expand Down
3 changes: 3 additions & 0 deletions lib/active_graph/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def empty_config
ActiveGraph::Config[:verbose_query_logs] = false
end

# By default, Rails loads generators from load path.
# However, if we want to place generators at a different location we have to use "generators" hook
# https://api.rubyonrails.org/classes/Rails/Railtie.html
generators do
require File.expand_path('../rails/generators/migration_helper.rb', __dir__)
end
Expand Down

0 comments on commit 95600ca

Please sign in to comment.