app/services/external_apis/dmphub_service.rb
def json_from_template(plan:)
        payload = ActionController::Base.new.render_to_string(
          partial: "/api/v1/plans/show", locals: { plan: plan }
        )

        { dmp: JSON.parse(payload) }.to_json
      end
# Prepare the DMP for transmission to the DMPHub (RDA Common Standard format)
Prepare the DMP for transmission to the DMPHub (RDA Common Standard format)
Prepare the DMP for transmission to the DMPHub ( RDA Common Standard format )
def json_from_template(plan:)
        payload = ActionController::Base.new.render_to_string(
          partial: "/api/v1/plans/show", locals: { plan: plan }
        )
        { dmp: JSON.parse(payload) }.to_json
      end
def json_from_template ( plan : ) payload = ActionController :: Base . new . render_to_string ( partial : "/api/v1/plans/show" , locals : { plan : plan } ) { dmp : JSON . parse ( payload ) } . to_json end
Prepare the DMP for transmission to the DMPHub (RDA Common Standard format)
Prepare the DMP for transmission to the DMPHub ( RDA Common Standard format )
plan