Open bpurinton opened 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.
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.
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.
Current plan:
draft:devise
, since it might be more overhead than it's worthdevise
and change sign-out to get
(in this lesson: https://learn.firstdraft.com/lessons/137-bulletin-board-2#setting-up-devise)
See here: https://github.com/firstdraft/draft_generators/tree/master/lib/generators/draft/devise
We would like something like:
That does:
rails generate devise:install
config/initializers/devise.rb
Line 269 toconfig.sign_out_via = :get
root "boards#index"
(not sure this is entirely necessary)cc @raghubetina @jelaniwoods