Home page route instead of root?

Maybe it’s just me, but I think “home” might be a better description than “root”. Students ask me “how do I indicate which action is my home page,” not “how do I indicate which action is my root page.” If this sounds appealing I can try to dig through the router code and see if I can submit a PR in time for Rails 4, and make “home” an alias for “root”.

But if there’s actually a good reason for keeping it as “root,” let me know and save me the effort :slight_smile:

Thanks!

Jeff

http://transitionculture.org/wp-content/uploads/bikeshed2.jpg

I’ve had similar questions from students, though I don’t remember if any have specifically addressed it as home. What if we added the word “home” to the description of the root path that is included (and commented out) by default after rails new? If students don’t read or ctrl-f for “home” in the default routes file, changing the name generated wouldn’t help anyway.

Adding aliases could be a can of worms, why not ‘welcome’ or ‘core’ or ‘main’ etc. This is a relatively trivial in the grand scheme of things to discuss, open up a PR (i would prefer documentation for now) and we can talk about it there.

Another point to take into account is that the “root” route can be used for any namespace, which is the “root” for that particular namespace. With no namespace, it’s the “root” page, ou home page as you say.

If the students have difficulty with understanding the concept of the home page being at the root of the site then I think there is little hope for them as they get into the details of Rails.

Colin

If the students have difficulty with understanding the concept of the home page being at the root of the site then I think there is little hope for them as they get into the details of Rails.

Never said it was difficult. They master the details of Rails just fine. But I lover the fact the Rails uses a smattering of English-like DSL usage throughout, and “root” stands out to me as something that might be improved upon.

I’ve had similar questions from students, though I don’t remember if any have specifically addressed it as home. What if we added the word “home” to the description of the root path that is included (and commented out) by default after rails new? If students don’t read or ctrl-f for “home” in the default routes file, changing the name generated wouldn’t help anyway.

Adding aliases could be a can of worms, why not ‘welcome’ or ‘core’ or ‘main’ etc. This is a relatively trivial in the grand scheme of things to discuss, open up a PR (i would prefer documentation for now) and we can talk about it there.

Good points. Perhaps I’ll instead contribute something to the Guides on the topic?