Class: Trestle::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_assetsObject



12
13
14
15
16
# File 'lib/generators/trestle/install/install_generator.rb', line 12

def create_assets
  css = (defined?(Sass) || defined?(SassC)) ? "scss" : "css"
  template "_custom.#{css}", "app/assets/stylesheets/trestle/_custom.#{css}"
  template "custom.js", "app/assets/javascripts/trestle/custom.js"
end

#create_directoryObject



18
19
20
# File 'lib/generators/trestle/install/install_generator.rb', line 18

def create_directory
  empty_directory "app/admin"
end

#create_initializerObject



8
9
10
# File 'lib/generators/trestle/install/install_generator.rb', line 8

def create_initializer
  template "trestle.rb.erb", "config/initializers/trestle.rb"
end