Sha256: dc2d32359057c343a87486fb1a9b5fa7adc480a5c461678c40237931b2a9996b

Contents?: true

Size: 594 Bytes

Versions: 5

Compression:

Stored size: 594 Bytes

Contents

module Ecm
  module Courses
    module Generators
      class InstallGenerator < Rails::Generators::Base
        desc "Generates the initializer"

        source_root File.expand_path('../templates', __FILE__) 
        
        def generate_initializer
          copy_file "initializer.rb", "config/initializers/ecm_courses.rb"
        end   

        def generate_routes
          inject_into_file 'config/routes.rb', before: "\nend" do
            File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
          end
        end
      end
    end
  end
end        

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecm_courses2-1.1.4 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.1.3 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.1.2 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.1.1 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.1.0 lib/generators/ecm/courses/install/install_generator.rb