Class: SeoOptimizer::MetaTagsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SeoOptimizer::MetaTagsGenerator
- Defined in:
- lib/generators/seo_optimizer/meta_tags/meta_tags_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_meta_tags ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/generators/seo_optimizer/meta_tags/meta_tags_generator.rb', line 10 def inject_into_file 'app/views/layouts/application.html.erb', after: '<head>' do File.open("#{File.('templates', __dir__)}/meta_tags.erb").read end template 'meta_tags_helper.erb', File.join('app/helpers', 'meta_tags_helper.rb') template 'default_meta.erb', File.join('config/initializers', 'default_meta.rb') template 'meta_yml.erb', File.join('config', 'meta.yml') end |