Class: RwDepotTheme::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rw_depot_theme/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_asset_loadsObject



16
17
18
19
20
21
22
# File 'lib/generators/rw_depot_theme/install/install_generator.rb', line 16

def add_asset_loads
  say_status("inserting", "Asset load paths", :green)
  append_file("app/assets/javascripts/application.js", "//= require depot")
  inject_into_file("app/assets/stylesheets/application.css", :before => '*/') do
    " *= require depot\n"
  end
end

#copy_layoutObject



10
11
12
13
14
# File 'lib/generators/rw_depot_theme/install/install_generator.rb', line 10

def copy_layout
  say_status("copying", "Application Layout", :green)
  remove_file("app/views/layouts/application.html.erb")
  copy_file("application.html.erb", "app/views/layouts/application.html.erb")
end