Sha256: 643a7d41fd5b615552942880d31ca531c8fa6b22eba84001fbd94d412f950e67

Contents?: true

Size: 789 Bytes

Versions: 3

Compression:

Stored size: 789 Bytes

Contents

require 'rails/generators'

module MetaReports
  module Generators
    class InstallTemplatesGenerator < Rails::Generators::Base
      source_root File.expand_path('../../../..', __FILE__)
      
      desc 'Copy meta_reports templates.'

      def install_models
        directory "app/models/meta_reports", "app/models/meta_reports"
        copy_file "lib/generators/meta_reports/templates/models/report_non_activerecord.rb", "app/models/meta_reports/report.rb"
      end

      def install_helper
        copy_file "app/helpers/meta_reports/reports_helper.rb", "app/helpers/meta_reports/reports_helper.rb"
      end

      def install_views
        directory "lib/generators/meta_reports/templates/views/templates", "app/views/meta_reports/reports/templates"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
meta_reports-0.0.5 lib/generators/meta_reports/install_templates_generator.rb
meta_reports-0.0.4 lib/generators/meta_reports/install_templates_generator.rb
meta_reports-0.0.3 lib/generators/meta_reports/install_templates_generator.rb