luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

submit helper does not accept attrs #1758

Closed jcads closed 1 year ago

jcads commented 1 year ago

Describe the bug Passing an attribute to submit raises an error

To Reproduce submit "Save Changes", data_disable_with: "Saving...", attrs: [:disabled]

web          | In lib/lucky/src/lucky/tags/base_tags.cr:282:14
web          |
web          |  282 | options[key.to_s] = value
web          |               ^
web          | Error: no overload matches 'Hash(String, Lucky::AllowedInTags | String)#[]=' with types String, (Array(Symbol) | String)
web          |
web          | Overloads are:
web          |  - Hash(K, V)#[]=(key : K, value : V)
web          | Couldn't find overloads for these types:
web          |  - Hash(String, Lucky::AllowedInTags | String)#[]=(key : String, value : Array(Symbol))

Versions

jwoertink commented 1 year ago

Ah, good find!