Class: SeoOptimizer::RobotsFilesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SeoOptimizer::RobotsFilesGenerator
- Defined in:
- lib/generators/seo_optimizer/robots_files/robots_files_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_controller_files ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/generators/seo_optimizer/robots_files/robots_files_generator.rb', line 10 def create_controller_files prod_variable = Rails.configuration.sitemap_config_variable rescue raise(SeoOptimizer::Error, ) url = prod_variable[:production_url] raise SeoOptimizer::Error, replace_url_error if !url || url == 'https://YOUR-PRODUCTION-URL.com' site_map_xml robots_text end |