Skip to content

Commit 93f8cb7

Browse files
committed
Add class_path to allow generated components to reside in subdirectories
1 parent 21ae89b commit 93f8cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/react/component_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def create_component_file
112112
target_dir = 'app/assets/javascripts/components'
113113
end
114114

115-
file_path = File.join(target_dir, "#{new_file_name}.#{extension}")
115+
file_path = File.join(target_dir, class_path, "#{new_file_name}.#{extension}")
116116
template("component.#{template_extension}", file_path)
117117
end
118118

0 commit comments

Comments
 (0)