Class: Bootstrap::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootstrap::Generators::InstallGenerator
- Defined in:
- lib/generators/bootstrap/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_javascripts ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/bootstrap/install/install_generator.rb', line 17 def add_javascripts if File.exist?('app/assets/javascripts/application.js') insert_into_file 'app/assets/javascripts/application.js', "//= require twitter/bootstrap\n", :after => "jquery_ujs\n" else copy_file 'application.js', 'app/assets/javascripts/application.js' end end |
#add_stylesheets ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/generators/bootstrap/install/install_generator.rb', line 9 def add_stylesheets if File.exist?('app/assets/stylesheets/application.css.scss') insert_into_file 'app/assets/stylesheets/application.css.scss', %Q{@import "twitter/bootstrap"\n}, :before => "@import" else copy_file 'application.css.scss', 'app/assets/stylesheets/application.css.scss' end end |