Sha256: ff441d9cb552a76b5af14b4f60a6b4090e97dd62cfd6e83493ea3834f22e46cc
Contents?: true
Size: 641 Bytes
Versions: 24
Compression:
Stored size: 641 Bytes
Contents
module Trestle module Generators class AdminGenerator < ::Rails::Generators::NamedBase desc "Creates a non-resourceful Trestle admin" source_root File.expand_path("../templates", __FILE__) def create_admin template "admin.rb.erb", File.join("app/admin", class_path, "#{singular_name}_admin.rb") end def create_template template "index.html.erb", File.join("app/views/admin", class_path, singular_name, "index.html.erb") end protected def module_name class_name.deconstantize end def module? module_name.present? end end end end
Version data entries
24 entries across 24 versions & 1 rubygems