require 'rails/generators' module Indices module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) def create_initializer_file copy_file 'initializer.rb', 'config/initializers/indices.rb' end end end end