Skip to content

Commit

Permalink
Configure Zeitwerk to ignore our generator
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Oct 20, 2023
1 parent b71e7d0 commit b4227ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions example_app_generator/generate_stuff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def source_paths
end

def setup_tasks
copy_file 'config/initializers/zeitwerk.rb'
copy_file 'app/models/in_memory/model.rb'
copy_file 'lib/rails/generators/in_memory/model/model_generator.rb'
copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if Rails.autoloaders.respond_to?(:main)
Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb')
end

0 comments on commit b4227ab

Please sign in to comment.