faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
_whitelogger has joined #amber
<FromGitter> <waghanza> hi, does amber support route constraint
<FromGitter> <waghanza> for example ⏎ ~~~crystal ⏎ get "/user/:id", ApplicationController, :get, id: /\d+/ ⏎ ~~~ ⏎ to restrict `/user/:id` to numerical `:id` ? [https://gitter.im/amberframework/amber?at=5d26e9d6eab1bd15a83da6ac]
feepbot has quit [Ping timeout: 245 seconds]
feepbot has joined #amber
<FromGitter> <Blacksmoke16> `get '/:id', to: 'articles#show', constraints: { id: /\d.+/ }`
<FromGitter> <Blacksmoke16> or something like that, depends on what the controller/method name is
<FromGitter> <Blacksmoke16> @waghanza
<FromGitter> <waghanza> @Blacksmoke16 get "/user/:id", to: "application#index", constraints: {id: /\d+/} gives me a ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d273be6d0e06b6675877220]
<FromGitter> <Blacksmoke16> try like `get '/user/:id', SomeController, :method_name, constraints: { id: /\d+/ }`
<FromGitter> <Blacksmoke16> https://github.com/amberframework/amber/pull/1090 is the PR
<FromGitter> <waghanza> same
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> `get "/user/:id", ApplicationController, :get, constraints: { id: /\d+/ }`
<FromGitter> <Blacksmoke16> if that doesnt work then IDK :shrug:
<FromGitter> <waghanza> same error `here` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5d2741d0eab1bd15a8406e00]
<FromGitter> <Blacksmoke16> yea i dunno, maybe @eliasjpr or @drujensen would have an idea
<FromGitter> <drujensen> try `get "/user/:id", ApplicationController, :get, constraints: {“id” => /\d+/}`
<FromGitter> <drujensen> looks like named tuples is not supported. :-(
<FromGitter> <waghanza> same error @drujensen