-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a component is registered that starts with `call` the compiler detects it as a template method which is not correct. This changes the compiler to look for `call(_|$)` instead of `call` to avoid this issue. This means that slots can't (and couldn't) start with `call_` since we still rely on the `call_` naming convention to generate the template methods. To make this more dev friendly, this adds a check that raises an error if a slot name starts with `call_`. A more long-term fix would be to use some kind of template method container instead of relying on the `call_` naming convention. Fixes #1825
- Loading branch information
1 parent
b0ed862
commit 5f04292
Showing
5 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class HeaderComponent < ViewComponent::Base | ||
renders_one :callout_title | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters