Class: InertiaRails::Generators::ScaffoldTemplateBase
- Inherits:
-
ControllerTemplateBase
- Object
- Rails::Generators::NamedBase
- ControllerTemplateBase
- InertiaRails::Generators::ScaffoldTemplateBase
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/inertia_rails/generators/scaffold_template_base.rb
Direct Known Subclasses
InertiaTemplates::Generators::ScaffoldGenerator, InertiaTwTemplates::Generators::ScaffoldGenerator
Instance Method Summary collapse
Methods inherited from ControllerTemplateBase
Methods included from Helper
#attributes_to_serialize, #custom_form_attributes, #default_value, guess_inertia_template, guess_the_default_framework, guess_typescript, #inertia_base_path, #inertia_component_name, #inertia_js_version, #inertia_model_form_type, #inertia_model_type, #input_type, #js_edit_resource_path, #js_new_resource_path, #js_resource_path, #js_resources_path, #omit_input_attributes, #ts_type
Instance Method Details
#copy_view_files ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/inertia_rails/generators/scaffold_template_base.rb', line 15 def copy_view_files available_views.each do |view| template "#{.frontend_framework}/#{view}.#{template_extension}", File.join(base_path, "#{view}.#{extension}") end template "#{.frontend_framework}/#{partial_name}.#{template_extension}", File.join(base_path, "#{inertia_component_name}.#{extension}") template "#{.frontend_framework}/types.ts", File.join(base_path, 'types.ts') if typescript? end |