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 ExportsHelper

#export_name_for

Methods included from FlashHelper

#display_admin_flash

Methods included from TreeHelper

#actions, #delete_button, #edit_button, #max_depth_for, #needs_placeholder?

Methods included from TagHelper

#add_button_for, #icon_link_to, #listing_for, #table_for

Methods included from MarkupHelper

#alert, #panel, #resources_table

Methods included from FormHelper

#para_form_for

Methods included from NavigationHelper

#component_section_active?

Methods included from OrderingHelper

#reorder_anchor

Methods included from ModelHelper

#attribute_field_mappings_for, #excerpt_value_for, #field_value_for, #model_field_mappings, #relation_klass_for

Methods included from SearchHelper

#filtered?, #fulltext_search_param_for, #searchable_attributes

Methods included from Generators::NameHelpers

#plural_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