Class: Sass::Generators::ScaffoldBase
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Sass::Generators::ScaffoldBase
show all
- Defined in:
- lib/rails/generators/sass_scaffold.rb
Instance Method Summary
collapse
Instance Method Details
#copy_stylesheet ⇒ Object
7
8
9
10
11
12
|
# File 'lib/rails/generators/sass_scaffold.rb', line 7
def copy_stylesheet
dir = ::Rails::Generators::ScaffoldGenerator.source_root
file = File.join(dir, "scaffold.css")
converted_contents = ::Sass::CSS.new(File.read(file)).render(syntax)
create_file "app/assets/stylesheets/scaffolds.css.#{syntax}", converted_contents
end
|