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

+ (Object) source_root



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

- (Object) generate_config_file



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('/', '_')}.rb"
end