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 helpful error when using select_tag with an attribute #1031

Open
paulcsmith opened this issue Mar 7, 2020 · 2 comments
Open

Add helpful error when using select_tag with an attribute #1031

paulcsmith opened this issue Mar 7, 2020 · 2 comments
Assignees
Labels
improve error experience Make errors nicer to deal with

Comments

@paulcsmith
Copy link
Member

https://gitter.im/luckyframework/Lobby?at=5e635af4afdc1e2033d6540a

The error isn’t helpful so we should have a more helpful one saying to use select_input with an attribute

@paulcsmith paulcsmith self-assigned this Mar 7, 2020
@jwoertink
Copy link
Member

lol #985

@jwoertink jwoertink added the improve error experience Make errors nicer to deal with label Mar 8, 2020
@matthewmcgarvey
Copy link
Member

I think it's just a matter of adding a type signature to the options parameter

def {{method_name.id}}(options = EMPTY_HTML_ATTRS, **other_options) : Nil
{{ method_name.id }}("", options, **other_options)
end

The default arg is Hash(String, String) but I'm not entirely sure if that is always how people use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve error experience Make errors nicer to deal with
Projects
None yet
Development

No branches or pull requests

3 participants