Sha256: 72d9a050bcc21586d1b7cd27ed994ad1bd5fab495816aaac8dcd8d3daa71eac4
Contents?: true
Size: 714 Bytes
Versions: 9
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true module Maquina class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def create_initializer_file template "config/initializers/maquina.rb" end def add_route return if Rails.application.routes.routes.detect { |route| route.app.app == Maquina::Engine } route %(mount Maquina::Engine => "/m") end def add_concerns inject_into_file "app/controllers/application_controller.rb", after: "ActionController::Base" do <<~EOF \n include Maquina::Authenticate EOF end end def copy_migrations rake "maquina:install:migrations" end end end
Version data entries
9 entries across 9 versions & 1 rubygems