提交 1a7f0890 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #30693 from yhirano55/refactor_css_scaffold_generator

Refactor Css::Generators::ScaffoldGenerator
......@@ -5,13 +5,13 @@
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
dir = Rails::Generators::ScaffoldGenerator.source_root
file = File.join(dir, "scaffold.css")
create_file "app/assets/stylesheets/scaffold.css", File.read(file)
copy_file "scaffold.css", "app/assets/stylesheets/scaffold.css"
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册