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



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

def filter_fields
  @model_info.data_items.filter_fields
end

#load_field_optionsObject



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

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



9
10
11
12
13
14
# File 'app/services/model_controller/instance_options.rb', line 9

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



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

def load_options
  load_model_options
  load_field_options
  load_template_options
end

#load_template_optionsObject



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

def load_template_options
  @form_template_path ||= form_template_path
end

#origin_fieldsObject



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

def origin_fields
  @model_info.data_items.origin_fields
end