diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/generators/inboxes/views_generator.rb | 15 |
1 files changed, 6 insertions, 9 deletions
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 |
