chrismccord / phoenix_live_view_example

538 stars 187 forks source link

Whats the purpose of the user_controller? #14

Closed joshchernoff closed 5 years ago

joshchernoff commented 5 years ago

Trying to understand why this was added to the demo. I couldn't find if it was being used, so this is more a question than a bug. I assume it's not being used at all.

https://github.com/chrismccord/phoenix_live_view_example/blob/master/lib/demo_web/controllers/user_controller.ex

al2o3cr commented 5 years ago

It's mounted at /plain/users:

https://github.com/chrismccord/phoenix_live_view_example/blob/13b07ae9a019fb89511d7f06f4634b992bc64627/lib/demo_web/router.ex#L37

chrismccord commented 5 years ago

It's the original generated controller I ran from mix phx.gen.html. Not necessary at all :)

machineloop commented 5 years ago

Hey @chrismccord, realize this thread is now closed, but curious whether it's possible to gracefully degrade (without JS/socket) the new user form submission to the /plain/users UserController?

I've tried it out a couple different ways, but can't get the form to submit successfully... Thanks!