Class: Madmin::Generators::ViewsGenerator

Inherits:
ViewGenerator
  • Object
show all
Defined in:
lib/generators/madmin/views/views_generator.rb

Constant Summary

Constants included from Madmin::GeneratorHelpers

Madmin::GeneratorHelpers::ROUTES_FILE

Instance Method Summary collapse

Methods inherited from ViewGenerator

template_source_path

Methods included from Madmin::GeneratorHelpers

#call_generator, #optimize_indentation, #rails6_1_and_up?, #route, #route_namespace_exists?

Instance Method Details

#copy_templatesObject



6
7
8
9
10
11
12
13
# File 'lib/generators/madmin/views/views_generator.rb', line 6

def copy_templates
  # Some generators duplicate templates, so not everything is present here
  call_generator("madmin:views:edit", resource_path, "--namespace", namespace)
  call_generator("madmin:views:index", resource_path, "--namespace", namespace)
  call_generator("madmin:views:layout", resource_path, "--namespace", namespace)
  call_generator("madmin:views:new", resource_path, "--namespace", namespace)
  call_generator("madmin:views:show", resource_path, "--namespace", namespace)
end