instance method
copy_stylesheet
Ruby on Rails 3.1.12
Since v3.1.12 Last seen in v3.2.22.5Available in: v3.1.12 v3.2.22.5
Signature
copy_stylesheet()
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.
Source
# File railties/lib/rails/generators/css/scaffold/scaffold_generator.rb, line 9
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
Defined in railties/lib/rails/generators/css/scaffold/scaffold_generator.rb line 9
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Css::Generators::ScaffoldGenerator