Class: DynamicFieldsets::InstructionField

Inherits:
Field
  • Object
show all
Defined in:
app/models/dynamic_fieldsets/instruction_field.rb

Overview

A special field used only for instruction No user input is included

Note that this field does not use the default header and footer partials for the fields

Instance Method Summary collapse

Methods inherited from Field

#collect_default_values, #collect_field_records_by_fsa_and_fsc, descendant_collection, descendants, #display_type, #form_footer_partial, #form_header_partial, #form_partial, #get_value_for_show, #get_values_using_fsa_and_fsc, #has_defaults?, #html_attribute_hash, #in_use?, #show_footer_partial, #show_header_partial, #show_partial_locals, #use_show_footer_partial?, #use_show_header_partial?, #uses_field_options?

Instance Method Details

#form_partial_locals(args) ⇒ Hash



23
24
25
26
27
# File 'app/models/dynamic_fieldsets/instruction_field.rb', line 23

def form_partial_locals(args)
  output = super
  output[:label] = self.label
  return output
end

#show_partialObject

no answers possible, need an include for this?



9
10
11
# File 'app/models/dynamic_fieldsets/instruction_field.rb', line 9

def show_partial
  "/dynamic_fieldsets/show_partials/show_instruction"
end

#update_field_records(fsa, fieldset_child, value) ⇒ Object

Do not update any options for the instruction



30
31
32
# File 'app/models/dynamic_fieldsets/instruction_field.rb', line 30

def update_field_records(fsa, fieldset_child, value)
  # do nothing
end


18
19
20
# File 'app/models/dynamic_fieldsets/instruction_field.rb', line 18

def use_form_footer_partial?
  false
end

#use_form_header_partial?Boolean



13
14
15
# File 'app/models/dynamic_fieldsets/instruction_field.rb', line 13

def use_form_header_partial?
  false
end