Sha256: cbe40f2c8d947a5476aa1e3aae85f8cf9024a86f8f2ab4c11332a5cd74a44eba
Contents?: true
Size: 638 Bytes
Versions: 5
Compression:
Stored size: 638 Bytes
Contents
module FavouriteObject class TemplateGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :addition_classes, :type => :array, :default => [] 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems