Class: ActiveAdmin::Generators::ResourceGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/active_admin/resource/resource_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



6
7
8
# File 'lib/generators/active_admin/resource/resource_generator.rb', line 6

def self.source_root
  @_active_admin_source_root ||= File.expand_path("../templates", __FILE__)
end

Instance Method Details

#generate_config_fileObject



10
11
12
# File 'lib/generators/active_admin/resource/resource_generator.rb', line 10

def generate_config_file
  template "admin.rb", "app/admin/#{file_path.gsub('/', '_').pluralize}.rb"
end