Sha256: 4088cb090f71860293a7598fe558721747274b2f9b9e98b2a2dd741874b16767

Contents?: true

Size: 615 Bytes

Versions: 4

Compression:

Stored size: 615 Bytes

Contents

class Tasuku::InstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  desc 'Install the default configurations for Tasuku'

  def copy_initializer
    template 'tasuku.rb', 'config/initializers/tasuku.rb'
  end

  def add_route
    route "mount Tasuku::Engine, at: '/tasks'"
  end

  def add_helpers
    inject_into_file 'app/controllers/application_controller.rb',
                     "\n  helper Tasuku::Engine.helpers",
                     after: 'protect_from_forgery with: :exception'
  end

  def copy_migrations
    rake 'tasuku:install:migrations'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tasuku-1.1.0 lib/generators/tasuku/install/install_generator.rb
tasuku-1.0.1 lib/generators/tasuku/install/install_generator.rb
tasuku-0.1.1 lib/generators/tasuku/install/install_generator.rb
tasuku-0.1.0 lib/generators/tasuku/install/install_generator.rb