Description
Very new to Crystal and Amber. Was going through the guides and generated a basic project with one User model. The app started and everything was good but "delete" of the user isn't working. It fails with a "CSRF check failed." error upon delete.
Also delete musn't be a http get request but a http post. The network request on delete is a GET with out of the box scaffolding and the URL looks like this - "http://localhost:3000/users/1?_method=delete"
Steps to Reproduce
- amber new myapp
- amber g scaffold User first_name:string last_name:string
- shards install (took me a while to figure out why amber was complaining that "require "amber"" is failing. Looks like crystal shards now install to a local lib folder
- amber w
- open http://localhost:3000
- Create a new user and try to delete the user
Expected behavior: http post request with _method of delete and no CSRF error
Actual behavior: http get request with an error that says "CSRF check failed."
Reproduces how often: Everytime
Versions
❯ amber --version
Amber CMD (amberframework.org) - v0.3.0
Additional Information
Just an out of the box scaffolding
Description
Very new to Crystal and Amber. Was going through the guides and generated a basic project with one User model. The app started and everything was good but "delete" of the user isn't working. It fails with a "CSRF check failed." error upon delete.
Also delete musn't be a http get request but a http post. The network request on delete is a GET with out of the box scaffolding and the URL looks like this - "http://localhost:3000/users/1?_method=delete"
Steps to Reproduce
Expected behavior: http post request with _method of delete and no CSRF error
Actual behavior: http get request with an error that says "CSRF check failed."
Reproduces how often: Everytime
Versions
❯ amber --version
Amber CMD (amberframework.org) - v0.3.0
Additional Information
Just an out of the box scaffolding