diff options
Diffstat (limited to 'railties/lib/rails/generators/css/scaffold/scaffold_generator.rb')
-rw-r--r-- | railties/lib/rails/generators/css/scaffold/scaffold_generator.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb new file mode 100644 index 0000000000..1d7fe9fac0 --- /dev/null +++ b/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb @@ -0,0 +1,16 @@ +require "rails/generators/named_base" + +module Css + module Generators + class ScaffoldGenerator < Rails::Generators::NamedBase + # In order to allow the Sass generators to pick up the default Rails CSS and + # transform it, we leave it in a standard location for the CSS stylesheet + # generators to handle. For the simple, default case, just copy it over. + def copy_stylesheet + dir = Rails::Generators::ScaffoldGenerator.source_root + file = File.join(dir, "scaffold.css") + create_file "app/assets/stylesheets/scaffold.css", File.read(file) + end + end + end +end |