class SmartAdmin::Generators::InstallGenerator
Public Instance Methods
generate_layout()
click to toggle source
# File lib/generators/smart_admin/install_generator.rb, line 6 def generate_layout copy_file "assets/admin.scss", "app/assets/stylesheets/admin.scss" copy_file "assets/admin.js", "app/assets/javascripts/admin.js" template "controllers/base_controller.rb", "app/controllers/admin/base_controller.rb" template "controllers/dashboards_controller.rb", "app/controllers/admin/dashboards_controller.rb" template "views/layouts/admin.html.haml", "app/views/layouts/admin.html.haml" copy_file "views/layouts/_flash.html.erb", "app/views/layouts/_flash.html.erb" template "views/layouts/_skinconfig.html.haml", "app/views/layouts/admin/_skinconfig.html.haml" template "views/layouts/_navigation.html.haml", "app/views/layouts/admin/_navigation.html.haml" template "views/layouts/_topnavbar.html.haml", "app/views/layouts/admin/_topnavbar.html.haml" template "views/layouts/_footer.html.haml", "app/views/layouts/admin/_footer.html.haml" template "views/layouts/_rightsidebar.html.haml", "app/views/layouts/admin/_rightsidebar.html.haml" template "views/admin/dashboards/index.html.haml", "app/views/admin/dashboards/index.html.haml" insert_into_file "config/routes.rb", " namespace :admin do\n resources :dashboards, only: [:index]\n end match '/admin', to: 'admin/dashboards#index', via: 'get' ", after: "Rails.application.routes.draw do\n" end