firstdraft / draft_generators

Rails generators that help beginners learn to program.
MIT License
2 stars 3 forks source link

draft:devise generator update #122

Open bpurinton opened 10 months ago

bpurinton commented 10 months ago

See here: https://github.com/firstdraft/draft_generators/tree/master/lib/generators/draft/devise

We would like something like:

rails generate draft:devise

That does:

cc @raghubetina @jelaniwoods

jelaniwoods commented 10 months ago

sets a root route? root "boards#index" (not sure this is entirely necessary)

I'm not sure we want to do this, since we can't really predict what route users wants to use for the root route. At least, I don't think we did this for the draft:account generator.

bpurinton commented 10 months ago

I'm not sure we want to do this

Yeah, that's what I was thinking. Will Devise complain if you don't put root controller#action in the top of the routes? Might need to include some copy / instructions to do that step manually.

jelaniwoods commented 10 months ago

Will Devise complain if you don't put root controller#action in the top of the routes?

I think it's just that Devise redirects to root after sign in/up so if you don't have that route you get a "No route matches error", which in all fairness, students should be able to debug. I'm not sure if this is mentioned in any of the updated written content, but I remember when Raghu demoed user generators in class, he would usually mention that a home page/root route was something that you need to do either before or after running the generator.

bpurinton commented 10 months ago

Current plan: