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

Add tests for set_value action and add kwarg support #25

Merged
merged 1 commit into from
Mar 3, 2023
Merged

Conversation

marcoroth
Copy link
Owner

This pull request adds tests for the set_value action. It also adds kwarg support for the action, previously only this worked:

turbo_stream.set_value("#input", "Value")

Which returned:

<turbo-stream targets="#input" action="set_value" value="Value"></turbo-stream>

Now all variations are supported:

turbo_stream.set_value("#input", "Value")
turbo_stream.set_value("#input", value: "Value")
turbo_stream.set_value(targets: "#input", value: "Value")
turbo_stream.set_value(target: "input", value: "Value")

@marcoroth marcoroth merged commit fb30706 into main Mar 3, 2023
@marcoroth marcoroth deleted the set-value branch March 3, 2023 00:28
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.

1 participant