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