Class: Para::NestedFieldsGenerator

Inherits:
Generators::NamedBase show all
Includes:
Admin::BaseHelper, Generators::FieldHelpers
Defined in:
lib/generators/para/nested_fields/nested_fields_generator.rb

Instance Method Summary collapse

Methods included from Admin::BaseHelper

#find_partial_for, #find_relation_name_for, #flash_message, #flash_shared_key, #registered_components_options, #resource_title_for, #template_path_lookup

Methods included from Helpers::ResourceName

#resource_name

Methods included from Generators::NameHelpers

#namespaced_class_name, #plural_namespaced_path, #singular_namespaced_path

Instance Method Details

#generate_fieldsObject



10
11
12
13
14
15
# File 'lib/generators/para/nested_fields/nested_fields_generator.rb', line 10

def generate_fields
  template(
    "_nested_fields.html.haml",
    "app/views/admin/#{ plural_namespaced_path }/_fields.html.haml"
  )
end

#generate_fields_containerObject



17
18
19
20
21
22
# File 'lib/generators/para/nested_fields/nested_fields_generator.rb', line 17

def generate_fields_container
  template(
    "../../../../../app/views/para/inputs/nested_many/_container.html.haml",
    "app/views/admin/#{ plural_namespaced_path }/nested_many/_container.html.haml"
  ) if options[:container]
end