Class: TypusTreeviewGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



3
4
5
# File 'lib/generators/typus_treeview_generator.rb', line 3

def source_root
  File.expand_path("../templates", __FILE__)
end

Instance Method Details

#copy_assetsObject



12
13
14
15
16
# File 'lib/generators/typus_treeview_generator.rb', line 12

def copy_assets
  copy_file "assets/jquery.treeview.js", "public/javascripts/jquery.treeview.js"
  copy_file "assets/jquery.treeview.css", "public/stylesheets/jquery.treeview.css"
  directory "assets/images", "public/images/jquery_treeview"
end

#copy_viewsObject



8
9
10
# File 'lib/generators/typus_treeview_generator.rb', line 8

def copy_views
  copy_file "views/sidebar.html.erb", "app/views/admin/helpers/sidebar/_sidebar.html.erb"
end