Sha256: 91ae5fb6cff49526ab8c5596aed68e54ce5fe8dcdba3b8877d7fc8045a2650f0

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 Bytes

Contents

# frozen_string_literal: true

module RailsMiniProfiler
  # Generators for Rails Mini Profiler
  module Generators
    # A basic installation generator to help set up users apps
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)

      # Install Rails Mini Profiler to your Rails app
      #
      # Updates the routes file to mount the engine, adds an initializer and copies a migration.
      desc 'Install rails-mini-profiler'
      def install
        route("mount RailsMiniProfiler::Engine => '/rails_mini_profiler'")
        template 'rails_mini_profiler.rb.erb', 'config/initializers/rails_mini_profiler.rb'
        system('rails rails_mini_profiler:install:migrations')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_mini_profiler-0.2.1 lib/generators/rails_mini_profiler/install_generator.rb
rails_mini_profiler-0.2.0 lib/generators/rails_mini_profiler/install_generator.rb