Skip to content

Commit fa8e686

Browse files
authored
Merge pull request #6310 from mamhoff/revert-6237
Setup generator namespace in generator
2 parents b997d79 + 0dfcf8a commit fa8e686

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

admin/lib/generators/solidus_admin/component/component_generator.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ class ComponentGenerator < Rails::Generators::NamedBase
1212
class_option :spec, type: :boolean, default: true
1313
class_option :preview, type: :boolean, default: true
1414

15+
def setup_namespace
16+
Rails::Generators.namespace = SolidusAdmin
17+
end
18+
1519
def setup_inflections
1620
# This is needed because the generator won't run the initialization process,
1721
# in order to ensure that UI is not rendered as Ui we need to setup inflections

admin/lib/generators/solidus_admin/install/templates/config/initializers/solidus_admin.rb.tt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,4 @@ SolidusAdmin::Config.configure do |config|
3737
# }
3838
# ]
3939
# }
40-
41-
# Define namespace for component generator
42-
::Rails::Generators.namespace = SolidusAdmin
4340
end

0 commit comments

Comments
 (0)