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

Catch and error when href passed to link #1428

Conversation

matthewmcgarvey
Copy link
Member

Purpose

Fixes #1415

Description

Link is a helper method that allows you to pass lucky routes instead of specifying the href string specifically. This adds a method overload to catch when href is accidentally passed.

Before I was able to add the overload, I had to refactor all the methods to have them funnel into one method so that an overload wouldn't have to be added for every different way you can call link

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

@matthewmcgarvey matthewmcgarvey changed the title Matthewmcgarvey/issue1415 Catch and error when href passed to link Mar 10, 2021
Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@matthewmcgarvey matthewmcgarvey merged commit 9485616 into luckyframework:master Mar 11, 2021
@matthewmcgarvey matthewmcgarvey deleted the matthewmcgarvey/issue1415 branch March 11, 2021 00:07
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 lets you pass href as well
2 participants