Sha256: 55df91eca5d441df88d4df74f6fc45f4e5fc6651ee5c2e930666002fd8c11323
Contents?: true
Size: 783 Bytes
Versions: 5
Compression:
Stored size: 783 Bytes
Contents
module NoPassword class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def create_initializer_file template "config/initializers/no_password.rb" end def add_route return if Rails.application.routes.routes.detect { |route| route.app.app == NoPassword::Engine } route %(mount NoPassword::Engine => "/p") end def add_concerns inject_into_file "app/controllers/application_controller.rb", after: "ActionController::Base" do <<~EOF \n include NoPassword::ControllerHelpers EOF end end def copy_migrations rake "no_password:install:migrations" end def build_tailwind rake "no_password:tailwindcss:build" end end end
Version data entries
5 entries across 5 versions & 1 rubygems