From 6477ad7cdba8a06fa00be6c374aaa1cad2d2f505 Mon Sep 17 00:00:00 2001 From: Kir Date: Tue, 1 Nov 2011 14:19:51 +0400 Subject: Clean up --- lib/generators/inboxes/views_generator.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/generators/inboxes/views_generator.rb b/lib/generators/inboxes/views_generator.rb index 67ce55e..117c05d 100644 --- a/lib/generators/inboxes/views_generator.rb +++ b/lib/generators/inboxes/views_generator.rb @@ -4,24 +4,21 @@ module Inboxes module Generators class ViewsGenerator < Rails::Generators::Base source_root File.expand_path('../../../../app/views', __FILE__) - class_option :template_engine, :type => :string, :aliases => '-e', :desc => 'Template engine for the views. Available options are "erb" and "haml".' + #class_option :template_engine, :type => :string, :aliases => '-e', :desc => 'Template engine for the views. Available options are "erb" and "haml".' + # TODO support of both haml and erb def copy_or_fetch - # templates = - # [ - # "discussions/" - # ] filename_pattern = File.join self.class.source_root, "*" #/*.html.#{template_engine}" Dir.glob(filename_pattern).map {|f| File.basename f}.each do |f| directory f.to_s, "app/views/#{f}" end end - private + # private - def template_engine - options[:template_engine].try(:to_s).try(:downcase) || 'erb' - end + # def template_engine + # # options[:template_engine].try(:to_s).try(:downcase) || 'erb' + # end end end end \ No newline at end of file -- cgit v1.2.3