Module: RademadeAdmin::InstanceOptions

Included in:
ModelController
Defined in:
app/services/model_controller/instance_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#form_fields_with_localeObject (readonly)

Returns the value of attribute form_fields_with_locale.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def form_fields_with_locale
  @form_fields_with_locale
end

#form_fields_without_localeObject (readonly)

Returns the value of attribute form_fields_without_locale.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def form_fields_without_locale
  @form_fields_without_locale
end

#item_nameObject (readonly)

Returns the value of attribute item_name.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def item_name
  @item_name
end

#list_fieldsObject (readonly)

Returns the value of attribute list_fields.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def list_fields
  @list_fields
end

#model_classObject (readonly)

Returns the value of attribute model_class.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def model_class
  @model_class
end

#model_infoObject (readonly)

Returns the value of attribute model_info.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def model_info
  @model_info
end

#model_nameObject (readonly)

Returns the value of attribute model_name.



5
6
7
# File 'app/services/model_controller/instance_options.rb', line 5

def model_name
  @model_name
end

Instance Method Details

#filter_fieldsObject



31
32
33
# File 'app/services/model_controller/instance_options.rb', line 31

def filter_fields
  @model_info.data_items.filter_fields
end

#load_field_optionsObject



21
22
23
24
25
# File 'app/services/model_controller/instance_options.rb', line 21

def load_field_options
  @list_fields = @model_info.data_items.list_fields
  @form_fields_without_locale = @model_info.data_items.form_fields_without_locale
  @form_fields_with_locale = @model_info.data_items.form_fields_with_locale
end

#load_model_optionsObject



14
15
16
17
18
19
# File 'app/services/model_controller/instance_options.rb', line 14

def load_model_options
  @model_info = self.class.model_info
  @model_name = self.class.model_name
  @model_class = self.class.model_class
  @item_name = self.class.item_name
end

#load_optionsObject



39
40
41
42
43
# File 'app/services/model_controller/instance_options.rb', line 39

def load_options
  load_model_options
  load_field_options
  load_template_options
end

#load_template_optionsObject



35
36
37
# File 'app/services/model_controller/instance_options.rb', line 35

def load_template_options
  @form_template_path ||= form_template_path
end

#origin_fieldsObject



27
28
29
# File 'app/services/model_controller/instance_options.rb', line 27

def origin_fields
  @model_info.data_items.origin_fields
end