Sha256: 631d07db14ec468cab5083c34fceef8473cbffb006142266660b2def1e19334e

Contents?: true

Size: 883 Bytes

Versions: 63

Compression:

Stored size: 883 Bytes

Contents

require 'rails/generators'

module CmAdmin
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)

      def copy_initializer
        generate 'action_text:install'
        copy_file 'cm_admin_initializer.rb', 'config/initializers/zcm_admin.rb'
        copy_file 'custom.js', 'app/assets/javascripts/cm_admin/custom.js'
        copy_file 'custom.css', 'app/assets/stylesheets/cm_admin/custom.css'
        remove_file 'app/assets/stylesheets/actiontext.css'
        copy_file 'application_policy.rb', 'app/policies/application_policy.rb'
        route 'mount CmAdmin::Engine => "/admin"'
        generate 'migration', 'CreateFileImport associated_model_name:string added_by:references{polymorphic} error_report:jsonb completed_at:datetime status:integer'
        rake 'db:migrate'
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
cm-admin-4.1.2 lib/generators/cm_admin/install_generator.rb
cm-admin-4.1.1 lib/generators/cm_admin/install_generator.rb
cm-admin-4.1.0 lib/generators/cm_admin/install_generator.rb
cm-admin-4.0.0 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.16 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.15 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.14 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.13 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.12 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.11 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.10 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.9 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.8 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.7 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.6 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.5 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.4 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.3 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.2 lib/generators/cm_admin/install_generator.rb
cm-admin-3.0.1 lib/generators/cm_admin/install_generator.rb