Sha256: ba15c6a910d75cde67c686869f9a5bffc65732f8c622d8f63e723a4e3cdd3e43
Contents?: true
Size: 492 Bytes
Versions: 35
Compression:
Stored size: 492 Bytes
Contents
module Initial 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
35 entries across 35 versions & 1 rubygems