Class: Trestle::Generators::AdminGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/trestle/admin/admin_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_adminObject



8
9
10
# File 'lib/generators/trestle/admin/admin_generator.rb', line 8

def create_admin
  template "admin.rb.erb", File.join("app/admin", class_path, "#{singular_name}_admin.rb")
end

#create_templateObject



12
13
14
# File 'lib/generators/trestle/admin/admin_generator.rb', line 12

def create_template
  template "index.html.erb", File.join("app/views/admin", class_path, singular_name, "index.html.erb")
end