-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add render_parent helper method to avoid double-rendering hijinks (#1353
) * Add render_parent helper method to avoid double-rendering madness * Add CHANGELOG entry * Update docs/CHANGELOG.md Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update docs/guide/templates.md Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update docs/guide/templates.md Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update docs/guide/templates.md Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update lib/view_component/base.rb Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update lib/view_component/base.rb Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update lib/view_component/base.rb Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update lib/view_component/base.rb Co-authored-by: Joel Hawksley <joel@hawksley.org> * Update lib/view_component/base.rb Co-authored-by: Joel Hawksley <joel@hawksley.org> Co-authored-by: Joel Hawksley <joel@hawksley.org>
- Loading branch information
1 parent
2a35a19
commit 1ea088f
Showing
8 changed files
with
50 additions
and
0 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 @@ | ||
<div class="base-component"></div> |
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,4 @@ | ||
# frozen_string_literal: true | ||
|
||
class SuperBaseComponent < ViewComponent::Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="derived-component"> | ||
<%= render_parent %> | ||
</div> |
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,4 @@ | ||
# frozen_string_literal: true | ||
|
||
class SuperComponent < SuperBaseComponent | ||
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