Class: FavouriteObject::TemplateGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- FavouriteObject::TemplateGenerator
- Defined in:
- lib/generators/favourite_object/template/template_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_templates ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/favourite_object/template/template_generator.rb', line 6 def generate_templates # generate template files for name template "message.html.erb.erb", "app/views/favourite_object/#{name.underscore}/message.html.erb" addition_classes.each do |class_name| #iterates through each additional class and generates template files template "message.html.erb.erb", "app/views/favourite_object/#{class_name.underscore}/message.html.erb" end end |