Skip to content

Conversation

@matthewmcgarvey
Copy link
Member

Purpose

Fixes #1652

Description

This is an attempt at making link helper compile time errors better when passing in a Lucky::Action that needs params.

Screen Shot 2022-09-13 at 1 01 09 AM'

🙏 It's really late. I got the code working, but I hope you can see that the error message is a joke at the moment. Please help me with that. I am even wondering if we can access the action class in the error message to print out what is required? That might be a stretch too far though. Another thing I didn't look into is if this is useful anywhere else. I'd check anywhere we currently use Lucky::Action.class

@jwoertink
Copy link
Member

love it. ship it! also, do better 😂

@jwoertink
Copy link
Member

The code looks ok, but I would like to give this a shot with Crystal 1.6 first to see if the errors are going to change anyway. Actually... maybe it won't matter since it's not really the link that's wrong, but the action.. 🤔 I'll think about an error message in the meantime.

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.

link_to route helper shows obscure error for missing required arguments

3 participants