Sha256: 892fa8705a586824e4ce1238f8c1077306b2deed6702db36e7a137a21e492e48

Contents?: true

Size: 451 Bytes

Versions: 5

Compression:

Stored size: 451 Bytes

Contents

module PublishMyData
  class ConceptRenderParams

    def initialize(resource)
      @resource = resource
      @concept = resource.as_concept
    end

    def render_params(opts={})

      if opts[:is_html]
        @concept.eager_load_predicate_triples!(:labels_only => true)
        @concept.eager_load_object_triples!(:labels_only => true)
      end

      {template: 'publish_my_data/concepts/show', locals: {concept: @concept}}
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
publish_my_data-0.0.25 lib/publish_my_data/render_params/concept_render_params.rb
publish_my_data-0.0.24 lib/publish_my_data/render_params/concept_render_params.rb
publish_my_data-0.0.23 lib/publish_my_data/render_params/concept_render_params.rb
publish_my_data-0.0.22 lib/publish_my_data/render_params/concept_render_params.rb
publish_my_data-0.0.21 lib/publish_my_data/render_params/concept_render_params.rb