Sha256: 5b17d0d46030b940c34e1342c9f4d97659e6aba7e1849d16c9e961eb15e4ad86
Contents?: true
Size: 493 Bytes
Versions: 10
Compression:
Stored size: 493 Bytes
Contents
module Teleport class WelcomeGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def add template 'welcome/welcome_controller.rb', 'app/controllers/welcome_controller.rb' template 'welcome/index.haml', 'app/views/welcome/index.haml' remove_comments 'config/routes.rb' route "root 'welcome#index'" end private def remove_comments(filename) gsub_file(filename, /^\s*#.*\n/, '') end end end
Version data entries
10 entries across 10 versions & 1 rubygems