Sha256: 93d14e3092f69044be4ebfedf26440aaea000bad0375dec42ddf4c36ebec7360
Contents?: true
Size: 806 Bytes
Versions: 8
Compression:
Stored size: 806 Bytes
Contents
# shamelessly stolen from https://github.com/sferik/rails_admin/blob/master/lib/generators/rails_admin/utils.rb require 'rails/generators' require File.expand_path('../utils', __FILE__) module Hancock::Cms class AdminGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) include Generators::Utils::InstanceMethods #argument :_namespace, type: :string, required: false, desc: 'RailsAdmin url namespace' desc 'Hancock CMS RailsAdmin config generator' def install #namespace = ask_for('Where do you want to mount rails_admin?', 'admin', _namespace) # namespace = 'admin' # route("mount RailsAdmin::Engine => '/#{namespace}', as: 'rails_admin'") template 'admin.erb', 'config/initializers/rails_admin.rb' end end end
Version data entries
8 entries across 8 versions & 1 rubygems