Hi DHH, okay, thanks for considering. I understand, the common use case
I can see is for demonstration purposes mostly, when you are building a
Rails application from scratch and using some demonstration time to edit
the root route seems a bit distracting, but I agree, this isn't a very
compelling case to introduce such a change.
Best,
Rodrigo.
Em 23-12-2015 12:42, DHH escreveu:
Hi Rodrigo,
I don't think this is a common enough case that we need to have it in
the generator. You're mostly only going to set the root once. Editing
this by hand is imo just fine.
On Monday, December 21, 2015 at 5:02:22 PM UTC+1, Rodrigo Rosenfeld
Rosas wrote:
I was watching DHH's demo on ActionCable and something took my
attention
more than it should in my opinion.
One of the first things we do for every application is to generate a
root action and then manually edit routes.rb:
1 - rails g controller welcome index
2 - change routes.rb from "get 'welcome/index'" to "root to:
'welcome#index'"
Maybe it would be a good idea to introduce some kind of flag in the
generator to get this done automatically. It may be a tiny change
but it
makes a difference when you are demoing any Rails application from
scratch.
Maybe something like:
rails g controller welcome index:root help
Which would generate some routes like:
root to: 'welcome#index'
get 'welcome/help'
If another root action already exists or if two actions are
flagged as
root actions the generator command would raise an error.
Is this something you have considered before?
Best,
Rodrigo.
--
You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.