Class: SeoOptimizer::SetupsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/seo_optimizer/setups/setups_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_controller_filesObject



10
11
12
13
14
15
16
17
# File 'lib/generators/seo_optimizer/setups/setups_generator.rb', line 10

def create_controller_files
  Rails.configuration.sitemap_config_variable
rescue
  inject_into_file 'config/application.rb', :before => "  end" do
    "\n    config.sitemap_config_variable = {}" +
      "\n    config.sitemap_config_variable[:production_url] = 'https://YOUR-PRODUCTION-URL.com'\n\n"
  end
end