Closed ghost closed 5 years ago
I have reviewed this and I do not think it is the application but more the way I may be using phoenix. I do not believe that delete are allow from the UI that I am currently using. I have tested this one the demo app and all seems well + good. On my app however I run in to major issue so I believe more digging is need around the delete feature.
Ok so this is going to be a tale about that possible bug that was a not a bug.
The problem here was that phoenix uses javascript to its funkyness. This means that there has to be some reference of JS in there somewhere, but where and how ?
In the app.html.eex
in layouts under template there is the following line at the bottom <script src="<%= static_path(@conn, "/js/app.js") %>"></script>
This app.js has the following: import "phoenix_html"
This is key because this is where all the phoenix magic gets stored and then brunch compiles it into a thing. nmp install
in assets folder is vital command to run.
It seems to be that the logout session is non function. This is on the latest version running phoenix 1.4 as far as I am aware.
We keep getting the error that the path is not found. I have reviewed routes and the path is present. The current access method is the following:
<li><%= link "Log out", to: session_path(@conn, :delete), method: :delete %></li>
We get the error that route is not found. This is currently somewhat puzzling.
Error we get: no route found for GET /sessions