Sha256: 3c1900ec68509ea9f1171e7e04e6e4b9c55cf78a656b6f979eeabf4830396a69
Contents?: true
Size: 725 Bytes
Versions: 1
Compression:
Stored size: 725 Bytes
Contents
module Panel class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def add_route insert_into_file 'config/routes.rb', after: /(.*)::Application.routes.draw do/ do |match| "#{match}\n\n namespace :panel do\n root to: 'pages#index'\n end" end end def add_templates template 'install/base_controller.rb', 'app/controllers/panel/base_controller.rb' template 'install/pages_controller.rb', 'app/controllers/panel/pages_controller.rb' template 'install/index.html.erb', 'app/views/panel/pages/index.html.erb' copy_file 'install/panel.html.erb', 'app/views/layouts/panel.html.erb' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
panel-0.1.5 | lib/generators/panel/install_generator.rb |