diff --git a/app/models/madmp_fragment.rb b/app/models/madmp_fragment.rb index 696c76c..223d4ec 100644 --- a/app/models/madmp_fragment.rb +++ b/app/models/madmp_fragment.rb @@ -108,7 +108,7 @@ madmp_schema.schema end - def get_dmp_fragments + def dmp_fragments MadmpFragment.where(dmp_id: dmp.id) end diff --git a/app/views/branded/shared/dynamic_form/_form.html.erb b/app/views/branded/shared/dynamic_form/_form.html.erb index 138f1d5..0767c0a 100644 --- a/app/views/branded/shared/dynamic_form/_form.html.erb +++ b/app/views/branded/shared/dynamic_form/_form.html.erb @@ -4,7 +4,7 @@ <% additional_info = current_fragment.additional_info unless current_fragment.nil? %> <% validations = additional_info.present? && additional_info['validations'].present? ? additional_info["validations"] : nil %> -<% dmp_fragments = current_fragment.present? ? current_fragment.get_dmp_fragments() : [] %> +<% dmp_fragments = current_fragment.present? ? current_fragment.dmp_fragments() : [] %> <% schema_properties = schema.schema["properties"]%> <% required_fields = schema.schema["required"] %> <% schema_properties.each do |key, prop| %> diff --git a/app/views/branded/shared/export/_display_madmp_fragment.erb b/app/views/branded/shared/export/_display_madmp_fragment.erb index d0055cd..1d10a0a 100644 --- a/app/views/branded/shared/export/_display_madmp_fragment.erb +++ b/app/views/branded/shared/export/_display_madmp_fragment.erb @@ -1,6 +1,6 @@ <% sub_schemas = schema.sub_schemas %> <% data = fragment.data unless fragment.nil? %> -<% dmp_fragments = fragment.present? ? fragment.get_dmp_fragments() : [] %> +<% dmp_fragments = fragment.present? ? fragment.dmp_fragments() : [] %> <% schema_properties = schema.schema["properties"]%>