Sha256: 58c448825438b039365919578fe48fc14b0c689ea4ce583568e8ff283b89d9e0

Contents?: true

Size: 639 Bytes

Versions: 181

Compression:

Stored size: 639 Bytes

Contents

require "rails/generators/named_base"

module Css # :nodoc:
  module Generators # :nodoc:
    class ScaffoldGenerator < Rails::Generators::NamedBase # :nodoc:
      # 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

Version data entries

181 entries across 176 versions & 12 rubygems

Version Path
railties-5.1.0.rc1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.2 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.2.rc1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.1.0.beta1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-4.2.8 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-4.2.8.rc1 lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-5.0.1/lib/rails/generators/css/scaffold/scaffold_generator.rb
abaci-0.3.0 vendor/bundle/gems/railties-5.0.0/lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.1.rc2 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.1.rc1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-5.0.0.1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-4.2.7.1 lib/rails/generators/css/scaffold/scaffold_generator.rb
railties-4.2.7 lib/rails/generators/css/scaffold/scaffold_generator.rb