Sha256: 252d1ea3c72dd49d73e142095f1dd6a800f4d7695b8f7d744b7d988a06660d00

Contents?: true

Size: 593 Bytes

Versions: 10

Compression:

Stored size: 593 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_intializer
          copy_file "ecm_courses.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

10 entries across 10 versions & 1 rubygems

Version Path
ecm_courses2-1.0.3 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.0.2 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.0.1 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-1.0.0 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.2.4 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.2.3 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.2.2 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.2.1 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.2.0 lib/generators/ecm/courses/install/install_generator.rb
ecm_courses2-0.1.0 lib/generators/ecm/courses/install/install_generator.rb