I''d like to submit a change to rails but I am stuck on how to handle a part of it and would like some guidance. The change involves the generator part of rails, specifically, when the stylesheet is copied into a project. Currently, when a new project is created, no default stylesheet is provided. Only when a scaffold is generated, is the default stylesheet created. My changes reverse this behavior. I did a checkout of the rails trunk and modified the following files: trunk/railties/lib/rails_generator/generators/components/scaffold/templates/layout.rhtml trunk/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb however, this change also required 2 additional steps created trunk/railtles/html/stylesheets directory moved trunk/railties/lib/rails_generator/generators/components/scaffold/templates/style.css to trunk/railties/html/stylesheets/style.css so now when running ''rails myapp'', myapp/public/stylesheets/style.css is created. when generating scaffold, no stylesheet is generated and the scaffold layout now includes the style.css instead of scaffold.css. I think this is a better choice because, at least in my opinion, developers now have access to the default styles for error_messages_for, etc without having to generate any scaffold, if the choose not to. and if a developer does generate scaffold, the default stylesheet is already there, so there is no harm done by creating it early. anyways, my problem is on the last two steps. i''ve created the diff, but that doesn''t indicate that the new directory was created and the file moved. how would I go about indicating that in a patch? should i create a small script to automate the last 2 steps and submit that with the patch? Thanks, and sorry if I should have posted this to somewhere else. Chris _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Francois Beausoleil
2006-Apr-03 14:49 UTC
Re: question about submitting diff and other changes
Hi ! 2006/4/3, Chris Hall <christopher.k.hall@gmail.com>:> anyways, my problem is on the last two steps. i've created the diff, but > that doesn't indicate that the new directory was created and the file moved. > how would I go about indicating that in a patch? should i create a small > script to automate the last 2 steps and submit that with the patch?Just submit the diff and describe the actions that need to be taken in the ticket's description. Thanks for your work ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
thanks francois, patch submitted. http://dev.rubyonrails.org/ticket/4554 On 4/3/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote:> > Hi ! > > 2006/4/3, Chris Hall <christopher.k.hall@gmail.com>: > > anyways, my problem is on the last two steps. i''ve created the diff, > but > > that doesn''t indicate that the new directory was created and the file > moved. > > how would I go about indicating that in a patch? should i create a > small > > script to automate the last 2 steps and submit that with the patch? > > Just submit the diff and describe the actions that need to be taken in > the ticket''s description. > > Thanks for your work ! > -- > François Beausoleil > http://blog.teksol.info/ > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core > > >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core