Skip to content

Conversation

@stephannv
Copy link
Contributor

This will make the main components be generated inside their folder instead app/components/ruby_ui.

Running rails g ruby_ui:component Alert
Before:

- app/
  - components/
    - ruby_ui/
      - alert.rb
      - alert/
        - alert_description.rb
        - alert_title.rb

After:

- app/
  - components/
    - ruby_ui/
      - alert/
        - alert.rb
        - alert_description.rb
        - alert_title.rb

Since we have Rails.autoloaders.main.collapse(Rails.root.join("app/components/ruby_ui/*")), this folder organization doesn't change how we consume the components.

@stephannv stephannv requested review from cirdes and sethhorsley March 25, 2025 14:07
@stephannv stephannv self-assigned this Mar 25, 2025
Copy link
Collaborator

@cirdes cirdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephannv , everything inside the folder is better!

@stephannv stephannv merged commit 4a242b7 into main Mar 25, 2025
2 checks passed
@cirdes cirdes deleted the component_generator branch April 14, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants