Skip to content

Conversation

@stillhart
Copy link

add an explizit line that kebab-case should be used when manually registering controller in order to avoid issues further down then line with targets. Technically snake_case also works, but that results in an unpredictable target naming. Especially in combination with the rails helper tag.div ... data: {foo_bar_target: :baz}

https://discord.com/channels/988103760050012160/1044659701213835294/1160906429109125240

…istering controller in order to avoid issues further down then line with targets. Technically snake_case also works, but that results in an unpredicable target naming. especially in combination with the rails helper tag.div ... data: {foo_bar_target: :baz}
application.register("reference", ReferenceController)
```

Use kebab-case in references to ensure features like targets function correctly (i.e., controllers/date_picker_controller, DatePickerController, date-picker)
Copy link
Member

Choose a reason for hiding this comment

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

What do you think, would it instead make sense to update the example above to include the kebab-case version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants