Closed mishavetl closed 8 years ago
Hi @mishavetl, and thanks for the feedback! Could you specify what is out of date? We had recently went through our documentation to update recently changed parts, so we're hoping there wasn't anything we missed.
Anyways, we'd gladly accept any PR's if you want to help out, and if you have any questions along the way, just let us know!
There is no docs on args in routes
Ah, gotcha. I'm not sure how that got missed. Maybe because of Sugar using the same underlying routing as Plug.Router
. Essentially, you have two options for arguments in routes:
:
and will capture a single segment. Example - /message/:username
:
/message
/message/jim_bob
/message/jim_bob/from
*
and will capture any remaining segments. Example - /message/*args
:
/message
/message/jim_bob
/message/to/jim_bob
/message/to/jim_bob/from/mary_jane
For both simple parameters and globs, the capture is named with whatever comes after the prefix character, and whatever is acceptable for Elixir identifiers can be used for the name of the capture.
@mishavetl May I have your opinion about the current state of the documentation? :)
I think it is much better.
Hello,
Documentation on the website is really outdated and not full. I can try to update it
Thanks!