Sha256: 1512598903b20a4e3f86baf3cd61c7d954411146ebc6d75a419eaff964839b57
Contents?: true
Size: 837 Bytes
Versions: 33
Compression:
Stored size: 837 Bytes
Contents
# frozen_string_literal: true document_url = polymorphic_url(@document) doc_presenter = document_presenter(@document) json.links do json.self document_url end json.data do json.id @document.id json.type doc_presenter.display_type.first json.attributes do json.title doc_presenter.heading unless doc_presenter.fields_to_render.any? { |field_name, _field, _field_presenter| field_name.to_s == 'title' } doc_presenter.fields_to_render.each do |field_name, field, field_presenter| json.partial! 'field', field: field, field_name: field_name, document_url: document_url, doc_presenter: doc_presenter, field_presenter: field_presenter, view_type: 'show' end end end
Version data entries
33 entries across 32 versions & 2 rubygems