Class: Generators::Avo::ResourceGenerator

Inherits:
NamedBaseGenerator
  • Object
show all
Includes:
Concerns::OverrideController, Concerns::ParentController
Defined in:
lib/generators/avo/resource_generator.rb

Instance Method Summary collapse

Methods included from Concerns::OverrideController

#controllers_list, #override_controller?

Methods included from Concerns::ParentController

#parent_controller

Methods inherited from NamedBaseGenerator

#initialize

Constructor Details

This class inherits a constructor from Generators::Avo::NamedBaseGenerator

Instance Method Details

#createObject



20
21
22
23
24
25
# File 'lib/generators/avo/resource_generator.rb', line 20

def create
  return if override_controller?

  template "resource/resource.tt", "app/avo/resources/#{resource_name}.rb"
  invoke "avo:controller", [resource_name], options
end