On Thursday, 8 March 2012 at 10:58 AM, Nicolás Sanguinetti wrote: > On Thu, Mar 8, 2012 at 4:38 PM, Geoff Harcourt <[email protected] > (mailto:[email protected])> wrote: > > I would be in favor of either of these two options. I imagine extracting and > > gem-ifying the controllers would be a hassle, but then the default path for > > setting up a new view and controller action would require the user to think > > about what they are doing rather than just observe the magic. > > > > Unfortunately, I think that even if we were to extract out to a gem that > > every non-official tutorial and book would just tell users to add > > "rails_controller_generators" to their gemfile as the first step, and the > > intended goal of this work would be completely bypassed. > > > > > Pretty much this. Also, everyone using old books/tutorials (pre 4.0) > will run into trouble. > > Don't get me wrong, I'm wholly in favor of killing it. Repeatedly. And > violently. But truth is, it's hard do kill something that has been > around this long, and that is included in pretty much all tutorials > for rails that have existed since The Beginning of Time. > > Not sure what the best approach is. > > -foca In Rails 2 there was the removal of the scaffold method from the controllers. A major version then was the perfect time for that, and over time tutorials adjusted. If it was removed here, the same thing would occur. > > > > > On Thu, Mar 8, 2012 at 1:30 PM, Ryan Bigg <[email protected] > > (mailto:[email protected])> wrote: > > > > > > Hello friends, > > > > > > It's been fun having the scaffold generator exist as a part of Rails since > > > The Beginning Of Time, but I think its time is now up. It has been abused > > > time and time again, and most often leads to confusion amongst people who > > > are new to Rails. > > > > > > This confusion happens when a user first generates a scaffold and sees > > > that it is good. They can perform CRUD actions on a resource using one > > > command?! WOW! > > > > > > Then they try to modify the scaffold and run into problems. First of all: > > > how do they add an action to the controller? Do they need to run another > > > command? How do they then define a route for that action? A template? > > > > > > If they were to *not* use the scaffold generator from the beginning, I > > > believe they would have less confusion. They would know how to add another > > > action to the controller and a template for that action because this would > > > be how they're doing it from the start. Learning how to define a route > > > for a > > > new action in the controller is something easily learnable by reading the > > > routing guide. > > > > > > I think that we can fix this problem in one of two ways, the latter more > > > extreme than the first one. > > > > > > The first way is that we completely change the Getting Started Guide to > > > simply *mention* the scaffold generator, but then show people the > > > "correct" > > > way of generating a controller (rails g controller) and adding actions to > > > it > > > one by one, adding a model as its needed, and using similar practices to > > > how > > > you would do it in the "real world". > > > > > > The second way, and sorry if this sounds a little extreme, is to > > > completely remove the scaffold generator from the core of Rails itself. > > > This > > > means that there wouldn't even be the option to run the scaffold generator > > > for newbies. You could then extract this out into a gem if you *really* > > > wanted people to have the option for it. However, if this path was taken > > > it > > > should be made clear that this is not the "sanctioned" way to create > > > controllers. > > > > > > Thoughts? > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Ruby on Rails: Core" group. > > > To post to this group, send email to [email protected] > > > (mailto:[email protected]). > > > To unsubscribe from this group, send email to > > > [email protected] > > > (mailto:[email protected]). > > > For more options, visit this group at > > > http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Core" group. > > To post to this group, send email to [email protected] > > (mailto:[email protected]). > > To unsubscribe from this group, send email to > > [email protected] > > (mailto:[email protected]). > > For more options, visit this group at > > http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected] > (mailto:[email protected]). > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]). > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
