Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kwargs in slotable #399

Merged
merged 1 commit into from Jul 9, 2020

Conversation

eileencodes
Copy link
Contributor

In GitHub and in these tests the slots_component takes keyword
arguments, not args. The args variable needs to be double splatted
in the initalization caller.

The warnings can be seen when running the tests before this change was
introduced.

Fixes:

view_component/lib/view_component/slotable.rb:98: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
view_component/test/app/components/slots_component.rb:18: warning: The called method `initialize' is defined here

cc/ @joelhawksley

In GitHub and in these tests the slots_component takes keyword
arguments, not `args`. The `args` variable needs to be double splatted
in the initalization caller.

The warnings can be seen when running the tests before this change was
introduced.

Fixes:

```
view_component/lib/view_component/slotable.rb:98: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
view_component/test/app/components/slots_component.rb:18: warning: The called method `initialize' is defined here
```
@joelhawksley joelhawksley merged commit 5b13d52 into ViewComponent:master Jul 9, 2020
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.

None yet

2 participants