Sha256: a3e3bb3b1a4bfe7220421811cc62325077ab535ff2805ef302e23951505df71e

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

module PublishMyData
  class OntologyRenderParams

    def initialize(resource)
      @resource = resource
      @ontology = resource.as_ontology
    end

    def render_params(opts={})

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

      {template: 'publish_my_data/ontologies/show', locals: {ontology: @ontology}}
    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/ontology_render_params.rb
publish_my_data-0.0.24 lib/publish_my_data/render_params/ontology_render_params.rb
publish_my_data-0.0.23 lib/publish_my_data/render_params/ontology_render_params.rb
publish_my_data-0.0.22 lib/publish_my_data/render_params/ontology_render_params.rb
publish_my_data-0.0.21 lib/publish_my_data/render_params/ontology_render_params.rb