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

[Breaking change] Removing link overload that takes a String. #1035

Merged
merged 1 commit into from
Mar 8, 2020

Conversation

jwoertink
Copy link
Member

Purpose

Fixes #1033
Fixes #1026

Description

This removes the overloads for the link helper that take a String for the path. One of the overloads was link(to : String, **opts) which meant you could define link "Home", and it would be fine, but that shouldn't be. This also helps to keep links a bit more safe by using the Action class as the preferred method.

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

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

Looks awesome! 🚢

Example:
a "Home", href: "/"

link "Home", to: Home::Index
Copy link
Member

Choose a reason for hiding this comment

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

Niiice

@jwoertink jwoertink merged commit 0a7cc23 into master Mar 8, 2020
@jwoertink jwoertink deleted the updates/1033 branch March 8, 2020 00:15
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.

Proposal to drop link to: String. Link with just text and html attrs compiles when it shouldn't
2 participants