-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable components to use `@request` and `request` methods/ivars This replaces internal uses of `request` with `__vc_request` so any component that uses a request method or ivar will continue to work. * Update lib/view_component/base.rb * add test case * add changelog, fix test case * fix newline --------- Co-authored-by: Blake Williams <blake@blakewilliams.me>
- Loading branch information
1 parent
1176505
commit d0576c1
Showing
4 changed files
with
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class RequestParamComponent < ViewComponent::Base | ||
def initialize(request:) | ||
@request = request | ||
end | ||
|
||
def call | ||
@request | ||
end | ||
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