aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/css/scaffold/scaffold_generator.rb
blob: d8eb4f2c7b82475624ef1092b6bc2ba5f143271e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require_relative "../../named_base"

module Css # :nodoc:
  module Generators # :nodoc:
    class ScaffoldGenerator < Rails::Generators::NamedBase # :nodoc:
      source_root Rails::Generators::ScaffoldGenerator.source_root

      # 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
        copy_file "scaffold.css", "app/assets/stylesheets/scaffold.css"
      end
    end
  end
end