Skip to content

Comments

Add ability to create route objects with globs#2012

Merged
jwoertink merged 1 commit intomainfrom
issues/1926
Jan 22, 2026
Merged

Add ability to create route objects with globs#2012
jwoertink merged 1 commit intomainfrom
issues/1926

Conversation

@jwoertink
Copy link
Member

Purpose

Fixes #1926

Description

This allows you to construct a route helper object for an action that contains a glob. This becomes useful for writing specs.

class Reporting::Index < BrowserAction
  get "/reporting/*:filter" do
    # ...
  end
end

# this is now possible
Reporting::Index.with(filter: "2025/TPS")

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

@jwoertink jwoertink merged commit 822b057 into main Jan 22, 2026
9 checks passed
@jwoertink jwoertink deleted the issues/1926 branch January 22, 2026 00:56
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.

Building URLs with globbed routing

1 participant