Sha256: 5b395c9130d5412e1b20a23537f86c8c809f178f065bb86f54bffd7bf2459cb8
Contents?: true
Size: 575 Bytes
Versions: 7
Compression:
Stored size: 575 Bytes
Contents
module Trestle module Auth module Generators class AdminGenerator < ::Rails::Generators::Base desc "Creates a Trestle admin for managing Administrators" argument :model, type: :string, default: "Administrator" source_root File.expand_path("../templates", __FILE__) def create_admin template "admin.rb.erb", File.join('app/admin/auth', "#{model.underscore.pluralize}_admin.rb") end protected def plural_name model.demodulize.underscore.pluralize end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems