This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 579
Route Helpers in Templates can't distinguish between a path that requires a variable, and path that doesn't #1941
Comments
@L1ghtman2k thanks for reporting this one. I will work on this one, meanwhile you can do something like:
To distinguish the routes. |
Merged
paganotoni
added a commit
that referenced
this issue
Apr 14, 2020
paganotoni
added a commit
that referenced
this issue
Apr 14, 2020
paganotoni
added a commit
that referenced
this issue
Apr 15, 2020
* merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change * Merging master (#1936) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome (#1933) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome The latest version of font-awesome requires the js file to also be present for a glyph to work. To see this work, add this code to any page template: ```html <h3> <a href=#" target="_blank"><i class="fab fa-twitter-square share" aria-hidden="true"></i></a> </h3> ``` Without this JS file, the glyph will not render. Co-authored-by: Antonio Pagano <[email protected]> Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Fixes generated package.json and resources generator (#1944) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary * Bump pop version (#1937) * adding resource and new app generator fixes * fixing buffalo generator to use v5 of pop * updating popper and removing repeated version of webpack-manifest * updating old tooling on the JS side * updating webpack version * updating node dependencies on fixture to remove github warnings Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * updating dockerfile to use v0.16.3 * packing * Adding new template for codeclimate code analysis (#1946) * adding new template for codeclimate code analysis * packing * Updates our coke app package.json and Yarn (#1947) * updating package.lock on the lock sample * removing old pop plugin * adding task to the fixers * removing the fixer part * Removes old buffalo-pop plugin (#1948) * removes old buffalo-pop plugin * naming change * using filepath for auto render files (#1951) * Bugfix c.Error http code (#1952) * fixes error code not being logged * adding tests for the status code when error handled fires * Allows to set test timeout (#1953) * allowing to pass timeout to the test command * packing * Fixes plush to use now plush/v4 (#1954) * Adding packr files (#1956) * Missing comments on the Plugins struct (#1958) * Adding packr files * adding a couple of comments missing * fixing mispell package (#1960) * Task #1941 (#1943) * covering non id cases on the route name generator * fixing broken tests * adding a few more test cases * moving to just use a string for simplified ID * bumping version * packing Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> Co-authored-by: Cory LaNou <[email protected]>
Thanks for reporting this one @L1ghtman2k. It should be fixed in |
paganotoni
added a commit
that referenced
this issue
Apr 21, 2020
* merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change * Merging master (#1936) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome (#1933) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome The latest version of font-awesome requires the js file to also be present for a glyph to work. To see this work, add this code to any page template: ```html <h3> <a href=#" target="_blank"><i class="fab fa-twitter-square share" aria-hidden="true"></i></a> </h3> ``` Without this JS file, the glyph will not render. Co-authored-by: Antonio Pagano <[email protected]> Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Fixes generated package.json and resources generator (#1944) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary * Bump pop version (#1937) * adding resource and new app generator fixes * fixing buffalo generator to use v5 of pop * updating popper and removing repeated version of webpack-manifest * updating old tooling on the JS side * updating webpack version * updating node dependencies on fixture to remove github warnings Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * updating dockerfile to use v0.16.3 * packing * Adding new template for codeclimate code analysis (#1946) * adding new template for codeclimate code analysis * packing * Updates our coke app package.json and Yarn (#1947) * updating package.lock on the lock sample * removing old pop plugin * adding task to the fixers * removing the fixer part * Removes old buffalo-pop plugin (#1948) * removes old buffalo-pop plugin * naming change * using filepath for auto render files (#1951) * Bugfix c.Error http code (#1952) * fixes error code not being logged * adding tests for the status code when error handled fires * Allows to set test timeout (#1953) * allowing to pass timeout to the test command * packing * Fixes plush to use now plush/v4 (#1954) * Adding packr files (#1956) * Missing comments on the Plugins struct (#1958) * Adding packr files * adding a couple of comments missing * fixing mispell package (#1960) * Task #1941 (#1943) * covering non id cases on the route name generator * fixing broken tests * adding a few more test cases * moving to just use a string for simplified ID * bumping version * packing * use go 1.14 for building goreleaser binaries (#1962) * adds an extra file to our releases that will be pulled by our docker images build process (#1964) * cleaning some docker issues (#1966) * Fix GO111MODULE value in build Docker images (#1970) * Add in GZIP compression to file serving (#1969) * Add in GZIP compression to file serving * Add option to control gzip * Added genny support for CircleCI as a CI provider. (#1972) * Added genny support for CircleCI as a CI provider. * Updated circleci template * Also fixed Travis and GitLab templates * removing helpers from the Go template Engine (#1971) * adding next version * packing * making codeclimate ignore packr files Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> Co-authored-by: Cory LaNou <[email protected]> Co-authored-by: Vlad Artamonov <[email protected]> Co-authored-by: Vincent Chu <[email protected]> Co-authored-by: James Turnbull <[email protected]>
paganotoni
added a commit
that referenced
this issue
May 25, 2020
* merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change * Merging master (#1936) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome (#1933) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Update js template to support font awesome The latest version of font-awesome requires the js file to also be present for a glyph to work. To see this work, add this code to any page template: ```html <h3> <a href=#" target="_blank"><i class="fab fa-twitter-square share" aria-hidden="true"></i></a> </h3> ``` Without this JS file, the glyph will not render. Co-authored-by: Antonio Pagano <[email protected]> Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * Fixes generated package.json and resources generator (#1944) * v0.16.1 (#1929) * merge changes from buffalo-cli into main repo * cache deps before building and copying source (#1884) cache deps before building and copying source so that we don't need to re-download as much and so that source changes don't invalidate our downloaded layer * Generator resource action test breaks with unused imports fixes #1893 (#1894) * Generator resource action test breaks with unused imports fixes #1893 * break packr cache * fix broken test * update deps (#1896) * update deps * update envy * update meta * switch to tags/v3 for consistency (#1901) * update helpers/tags * update validate * try to fix mismatched imports (#1921) * fixes more broken semantic import paths (#1925) * adding a few packages to replace * Replace Azure badge with Github actions badge (#1920) Co-authored-by: Antonio Pagano <[email protected]> * changing the packages to be replaced (#1928) * changing the packages to be replaced * adding back gobuffalo/uuid change Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> * Add stack trace to ErrPanic event for easier debugging and monitoring (#1930) Co-authored-by: Canh Nguyen <[email protected]> * Modifies our docker file to pull buffalo binary from releases. (#1935) * fixing docker image to use github binary * Bump pop version (#1937) * adding resource and new app generator fixes * fixing buffalo generator to use v5 of pop * updating popper and removing repeated version of webpack-manifest * updating old tooling on the JS side * updating webpack version * updating node dependencies on fixture to remove github warnings Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> * updating dockerfile to use v0.16.3 * packing * Adding new template for codeclimate code analysis (#1946) * adding new template for codeclimate code analysis * packing * Updates our coke app package.json and Yarn (#1947) * updating package.lock on the lock sample * removing old pop plugin * adding task to the fixers * removing the fixer part * Removes old buffalo-pop plugin (#1948) * removes old buffalo-pop plugin * naming change * using filepath for auto render files (#1951) * Bugfix c.Error http code (#1952) * fixes error code not being logged * adding tests for the status code when error handled fires * Allows to set test timeout (#1953) * allowing to pass timeout to the test command * packing * Fixes plush to use now plush/v4 (#1954) * Adding packr files (#1956) * Missing comments on the Plugins struct (#1958) * Adding packr files * adding a couple of comments missing * fixing mispell package (#1960) * Task #1941 (#1943) * covering non id cases on the route name generator * fixing broken tests * adding a few more test cases * moving to just use a string for simplified ID * bumping version * packing * use go 1.14 for building goreleaser binaries (#1962) * adds an extra file to our releases that will be pulled by our docker images build process (#1964) * cleaning some docker issues (#1966) * Fix GO111MODULE value in build Docker images (#1970) * Add in GZIP compression to file serving (#1969) * Add in GZIP compression to file serving * Add option to control gzip * Added genny support for CircleCI as a CI provider. (#1972) * Added genny support for CircleCI as a CI provider. * Updated circleci template * Also fixed Travis and GitLab templates * removing helpers from the Go template Engine (#1971) * adding next version * packing * making codeclimate ignore packr files * adding direct version on the docker build * fixing plugin installation * bumping version * Binding refactoring (#1975) * refactoring binding a bit * adding tests for null time decoder * removing unneeded variable * little bit of name changes * moving RequestTypeBinder interface * adding some missing comments * advancing on Marks recommendations. 1st step is to reduce the indirect behavior on the interface * back to locks * adding lock on Exec * adding those missing tests * moving time formats to the decoders section * added autoprefixer for bootstrap compilation (#1990) * Add batch mail sending (#1815) * Add batch mail sending * fix formatting * fix batch send * fix single mail check Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: Antonio Pagano <[email protected]> * Updates jQuery Dependency (#1995) * updating jquery and bootstrap to pass a security warning we have in the repo * changing docker version for next release * packing * removing extra file from the releaser * adding some missing comments * removing unused fields Co-authored-by: Mark Bates <[email protected]> Co-authored-by: Dr Nic Williams <[email protected]> Co-authored-by: HD Moore <[email protected]> Co-authored-by: Stanislas Michalak <[email protected]> Co-authored-by: xuancanh <[email protected]> Co-authored-by: Canh Nguyen <[email protected]> Co-authored-by: Cory LaNou <[email protected]> Co-authored-by: Vlad Artamonov <[email protected]> Co-authored-by: Vincent Chu <[email protected]> Co-authored-by: James Turnbull <[email protected]> Co-authored-by: arunsworld <[email protected]> Co-authored-by: Ilya Krasheninnikov <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Route Helpers in templates can't distinguish between a path that requires a variable, and path that doesn't. This means that if I have paths: /test/ and /test/{name}, I will not be able to refer to test in a template as follows:
<%= testPath() %> because buffalo makes user specify named parameters. One way to go around that limitation is to specify the parameter as nil:
<%= testPath({name: nil}) %>, however that will print out an extra forward slash: /test//
Steps to Reproduce the Problem
Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the
curl
command you used, that sort of thing.Expected Behavior
<%= testPath() %> resolves to /test/
Actual Behavior
index.html: line 57: could not call testPath function: missing parameters for /test/{name}/: mux: missing route variable "name"
Info
Please run
buffalo info
and paste the information below where it says "PASTE_HERE".The text was updated successfully, but these errors were encountered: